Skip to content

Commit

Permalink
Merge remote-tracking branch 'giteaoffical/main'
Browse files Browse the repository at this point in the history
* giteaoffical/main:
  Document 409 error returned by repos/migrate api (go-gitea#19376)
  Fix middleware function's placements for some `/user/...` (go-gitea#19377)
  Fix panic in teams API when requesting members (go-gitea#19360)
  • Loading branch information
zjjhot committed Apr 12, 2022
2 parents 6764005 + f029b9a commit b0967c4
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion routers/api/v1/org/team.go
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ func GetTeamMembers(ctx *context.APIContext) {
return
}

members := make([]*api.User, len(ctx.Org.Team.Members))
members := make([]*api.User, len(teamMembers))
for i, member := range teamMembers {
members[i] = convert.ToUser(member, ctx.Doer)
}
Expand Down
2 changes: 2 additions & 0 deletions routers/api/v1/repo/migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ func Migrate(ctx *context.APIContext) {
// "$ref": "#/responses/Repository"
// "403":
// "$ref": "#/responses/forbidden"
// "409":
// description: The repository with the same name already exists.
// "422":
// "$ref": "#/responses/validationError"

Expand Down
10 changes: 5 additions & 5 deletions routers/web/web.go
Original file line number Diff line number Diff line change
Expand Up @@ -429,18 +429,18 @@ func RegisterRoutes(m *web.Route) {

m.Group("/user", func() {
// r.Get("/feeds", binding.Bind(auth.FeedsForm{}), user.Feeds)
m.Get("/activate", auth.Activate, reqSignIn)
m.Post("/activate", auth.ActivatePost, reqSignIn)
m.Get("/activate", auth.Activate)
m.Post("/activate", auth.ActivatePost)
m.Any("/activate_email", auth.ActivateEmail)
m.Get("/avatar/{username}/{size}", user.AvatarByUserName)
m.Get("/recover_account", auth.ResetPasswd)
m.Post("/recover_account", auth.ResetPasswdPost)
m.Get("/forgot_password", auth.ForgotPasswd)
m.Post("/forgot_password", auth.ForgotPasswdPost)
m.Post("/logout", auth.SignOut)
m.Get("/task/{task}", user.TaskStatus)
m.Get("/stopwatches", user.GetStopwatches, reqSignIn)
m.Get("/search", user.Search, ignExploreSignIn)
m.Get("/task/{task}", reqSignIn, user.TaskStatus)
m.Get("/stopwatches", reqSignIn, user.GetStopwatches)
m.Get("/search", ignExploreSignIn, user.Search)
})
// ***** END: User *****

Expand Down
3 changes: 3 additions & 0 deletions templates/swagger/v1_json.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -2222,6 +2222,9 @@
"403": {
"$ref": "#/responses/forbidden"
},
"409": {
"description": "The repository with the same name already exists."
},
"422": {
"$ref": "#/responses/validationError"
}
Expand Down

0 comments on commit b0967c4

Please sign in to comment.