Skip to content

Commit 1103cca

Browse files
committed
bring back unit check
1 parent ee83b0d commit 1103cca

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

routers/api/v1/api.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1399,8 +1399,8 @@ func Routes() *web.Router {
13991399
}, mustAllowPulls, reqRepoReader(unit.TypeCode), context.ReferencesGitRepo())
14001400
m.Group("/statuses", func() {
14011401
m.Combo("/{sha}").Get(repo.GetCommitStatuses).
1402-
Post(reqToken(), tokenRequiresScopes(auth_model.AccessTokenScopeCategoryCommitStatus, auth_model.AccessTokenScopeCategoryRepository), bind(api.CreateStatusOption{}), repo.NewCommitStatus)
1403-
})
1402+
Post(reqToken(), tokenRequiresScopes(auth_model.AccessTokenScopeCategoryCommitStatus), reqRepoWriter(unit.TypeCode), bind(api.CreateStatusOption{}), repo.NewCommitStatus)
1403+
}, reqRepoReader(unit.TypeCode))
14041404
m.Group("/commits", func() {
14051405
m.Get("", context.ReferencesGitRepo(), repo.GetAllCommits)
14061406
m.Group("/{ref}", func() {

0 commit comments

Comments
 (0)