Cleanup one duplicated reqToken call

This commit is contained in:
harryzcy 2022-10-30 22:47:42 -04:00
parent f45bfe3b4d
commit 0f25b04505
No known key found for this signature in database
GPG key ID: CC2953E050C19686

View file

@ -817,8 +817,8 @@ func Routes(ctx gocontext.Context) *web.Route {
m.Post("/reject", repo.RejectTransfer) m.Post("/reject", repo.RejectTransfer)
}, reqToken(auth_model.AccessTokenScopeRepo)) }, reqToken(auth_model.AccessTokenScopeRepo))
m.Combo("/notifications", reqToken(auth_model.AccessTokenScopeNotification)). m.Combo("/notifications", reqToken(auth_model.AccessTokenScopeNotification)).
Get(reqToken(""), notify.ListRepoNotifications). Get(notify.ListRepoNotifications).
Put(reqToken(""), notify.ReadRepoNotifications) Put(notify.ReadRepoNotifications)
m.Group("/hooks/git", func() { m.Group("/hooks/git", func() {
m.Combo("").Get(reqToken(auth_model.AccessTokenScopeReadRepoHook), repo.ListGitHooks) m.Combo("").Get(reqToken(auth_model.AccessTokenScopeReadRepoHook), repo.ListGitHooks)
m.Group("/{id}", func() { m.Group("/{id}", func() {