Skip to content

Commit dc66e47

Browse files
lunny6543
andauthored
Fix middlewares sequences (#14354)
Co-authored-by: 6543 <6543@obermui.de>
1 parent 76fefd8 commit dc66e47

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

routers/api/v1/api.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,7 @@ func RegisterRoutes(m *macaron.Macaron) {
640640
m.Group("/:username/:reponame", func() {
641641
m.Combo("").Get(reqAnyRepoReader(), repo.Get).
642642
Delete(reqToken(), reqOwner(), repo.Delete).
643-
Patch(reqToken(), reqAdmin(), bind(api.EditRepoOption{}), context.RepoRefForAPI(), repo.Edit)
643+
Patch(reqToken(), reqAdmin(), context.RepoRefForAPI(), bind(api.EditRepoOption{}), repo.Edit)
644644
m.Post("/transfer", reqOwner(), bind(api.TransferRepoOption{}), repo.Transfer)
645645
m.Combo("/notifications").
646646
Get(reqToken(), notify.ListRepoNotifications).
@@ -713,8 +713,8 @@ func RegisterRoutes(m *macaron.Macaron) {
713713
Delete(reqToken(), repo.DeleteIssueComment)
714714
m.Combo("/reactions").
715715
Get(repo.GetIssueCommentReactions).
716-
Post(bind(api.EditReactionOption{}), reqToken(), repo.PostIssueCommentReaction).
717-
Delete(bind(api.EditReactionOption{}), reqToken(), repo.DeleteIssueCommentReaction)
716+
Post(reqToken(), bind(api.EditReactionOption{}), repo.PostIssueCommentReaction).
717+
Delete(reqToken(), bind(api.EditReactionOption{}), repo.DeleteIssueCommentReaction)
718718
})
719719
})
720720
m.Group("/:index", func() {
@@ -754,8 +754,8 @@ func RegisterRoutes(m *macaron.Macaron) {
754754
})
755755
m.Combo("/reactions").
756756
Get(repo.GetIssueReactions).
757-
Post(bind(api.EditReactionOption{}), reqToken(), repo.PostIssueReaction).
758-
Delete(bind(api.EditReactionOption{}), reqToken(), repo.DeleteIssueReaction)
757+
Post(reqToken(), bind(api.EditReactionOption{}), repo.PostIssueReaction).
758+
Delete(reqToken(), bind(api.EditReactionOption{}), repo.DeleteIssueReaction)
759759
})
760760
}, mustEnableIssuesOrPulls)
761761
m.Group("/labels", func() {

0 commit comments

Comments
 (0)