mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-23 20:17:03 +01:00
Fix middlewares sequences (#14354)
Co-authored-by: 6543 <6543@obermui.de>
This commit is contained in:
parent
76fefd803f
commit
dc66e4740f
1 changed files with 5 additions and 5 deletions
|
@ -640,7 +640,7 @@ func RegisterRoutes(m *macaron.Macaron) {
|
||||||
m.Group("/:username/:reponame", func() {
|
m.Group("/:username/:reponame", func() {
|
||||||
m.Combo("").Get(reqAnyRepoReader(), repo.Get).
|
m.Combo("").Get(reqAnyRepoReader(), repo.Get).
|
||||||
Delete(reqToken(), reqOwner(), repo.Delete).
|
Delete(reqToken(), reqOwner(), repo.Delete).
|
||||||
Patch(reqToken(), reqAdmin(), bind(api.EditRepoOption{}), context.RepoRefForAPI(), repo.Edit)
|
Patch(reqToken(), reqAdmin(), context.RepoRefForAPI(), bind(api.EditRepoOption{}), repo.Edit)
|
||||||
m.Post("/transfer", reqOwner(), bind(api.TransferRepoOption{}), repo.Transfer)
|
m.Post("/transfer", reqOwner(), bind(api.TransferRepoOption{}), repo.Transfer)
|
||||||
m.Combo("/notifications").
|
m.Combo("/notifications").
|
||||||
Get(reqToken(), notify.ListRepoNotifications).
|
Get(reqToken(), notify.ListRepoNotifications).
|
||||||
|
@ -713,8 +713,8 @@ func RegisterRoutes(m *macaron.Macaron) {
|
||||||
Delete(reqToken(), repo.DeleteIssueComment)
|
Delete(reqToken(), repo.DeleteIssueComment)
|
||||||
m.Combo("/reactions").
|
m.Combo("/reactions").
|
||||||
Get(repo.GetIssueCommentReactions).
|
Get(repo.GetIssueCommentReactions).
|
||||||
Post(bind(api.EditReactionOption{}), reqToken(), repo.PostIssueCommentReaction).
|
Post(reqToken(), bind(api.EditReactionOption{}), repo.PostIssueCommentReaction).
|
||||||
Delete(bind(api.EditReactionOption{}), reqToken(), repo.DeleteIssueCommentReaction)
|
Delete(reqToken(), bind(api.EditReactionOption{}), repo.DeleteIssueCommentReaction)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
m.Group("/:index", func() {
|
m.Group("/:index", func() {
|
||||||
|
@ -754,8 +754,8 @@ func RegisterRoutes(m *macaron.Macaron) {
|
||||||
})
|
})
|
||||||
m.Combo("/reactions").
|
m.Combo("/reactions").
|
||||||
Get(repo.GetIssueReactions).
|
Get(repo.GetIssueReactions).
|
||||||
Post(bind(api.EditReactionOption{}), reqToken(), repo.PostIssueReaction).
|
Post(reqToken(), bind(api.EditReactionOption{}), repo.PostIssueReaction).
|
||||||
Delete(bind(api.EditReactionOption{}), reqToken(), repo.DeleteIssueReaction)
|
Delete(reqToken(), bind(api.EditReactionOption{}), repo.DeleteIssueReaction)
|
||||||
})
|
})
|
||||||
}, mustEnableIssuesOrPulls)
|
}, mustEnableIssuesOrPulls)
|
||||||
m.Group("/labels", func() {
|
m.Group("/labels", func() {
|
||||||
|
|
Loading…
Reference in a new issue