Skip to content

Commit b0967c4

Browse files
committed
Merge remote-tracking branch 'giteaoffical/main'
* 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)
2 parents 6764005 + f029b9a commit b0967c4

File tree

4 files changed

+11
-6
lines changed

4 files changed

+11
-6
lines changed

routers/api/v1/org/team.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ func GetTeamMembers(ctx *context.APIContext) {
387387
return
388388
}
389389

390-
members := make([]*api.User, len(ctx.Org.Team.Members))
390+
members := make([]*api.User, len(teamMembers))
391391
for i, member := range teamMembers {
392392
members[i] = convert.ToUser(member, ctx.Doer)
393393
}

routers/api/v1/repo/migrate.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ func Migrate(ctx *context.APIContext) {
5252
// "$ref": "#/responses/Repository"
5353
// "403":
5454
// "$ref": "#/responses/forbidden"
55+
// "409":
56+
// description: The repository with the same name already exists.
5557
// "422":
5658
// "$ref": "#/responses/validationError"
5759

routers/web/web.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -429,18 +429,18 @@ func RegisterRoutes(m *web.Route) {
429429

430430
m.Group("/user", func() {
431431
// r.Get("/feeds", binding.Bind(auth.FeedsForm{}), user.Feeds)
432-
m.Get("/activate", auth.Activate, reqSignIn)
433-
m.Post("/activate", auth.ActivatePost, reqSignIn)
432+
m.Get("/activate", auth.Activate)
433+
m.Post("/activate", auth.ActivatePost)
434434
m.Any("/activate_email", auth.ActivateEmail)
435435
m.Get("/avatar/{username}/{size}", user.AvatarByUserName)
436436
m.Get("/recover_account", auth.ResetPasswd)
437437
m.Post("/recover_account", auth.ResetPasswdPost)
438438
m.Get("/forgot_password", auth.ForgotPasswd)
439439
m.Post("/forgot_password", auth.ForgotPasswdPost)
440440
m.Post("/logout", auth.SignOut)
441-
m.Get("/task/{task}", user.TaskStatus)
442-
m.Get("/stopwatches", user.GetStopwatches, reqSignIn)
443-
m.Get("/search", user.Search, ignExploreSignIn)
441+
m.Get("/task/{task}", reqSignIn, user.TaskStatus)
442+
m.Get("/stopwatches", reqSignIn, user.GetStopwatches)
443+
m.Get("/search", ignExploreSignIn, user.Search)
444444
})
445445
// ***** END: User *****
446446

templates/swagger/v1_json.tmpl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2222,6 +2222,9 @@
22222222
"403": {
22232223
"$ref": "#/responses/forbidden"
22242224
},
2225+
"409": {
2226+
"description": "The repository with the same name already exists."
2227+
},
22252228
"422": {
22262229
"$ref": "#/responses/validationError"
22272230
}

0 commit comments

Comments
 (0)