Skip to content

Commit

Permalink
fix routes check
Browse files Browse the repository at this point in the history
  • Loading branch information
lunny committed Nov 28, 2018
1 parent b677d04 commit 79365d8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions routers/api/v1/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -598,8 +598,7 @@ func RegisterRoutes(m *macaron.Macaron) {
m.Combo("/merge").Get(repo.IsPullRequestMerged).
Post(reqToken(), reqRepoWriter(models.UnitTypePullRequests), bind(auth.MergePullRequestForm{}), repo.MergePullRequest)
})

}, mustAllowPulls, context.ReferencesGitRepo())
}, mustAllowPulls, reqRepoReader(models.UnitTypeCode), context.ReferencesGitRepo())
m.Group("/statuses", func() {
m.Combo("/:sha").Get(repo.GetCommitStatuses).
Post(reqToken(), bind(api.CreateStatusOption{}), repo.NewCommitStatus)
Expand Down

0 comments on commit 79365d8

Please sign in to comment.