Skip to content

Commit 79365d8

Browse files
committed
fix routes check
1 parent b677d04 commit 79365d8

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

routers/api/v1/api.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -598,8 +598,7 @@ func RegisterRoutes(m *macaron.Macaron) {
598598
m.Combo("/merge").Get(repo.IsPullRequestMerged).
599599
Post(reqToken(), reqRepoWriter(models.UnitTypePullRequests), bind(auth.MergePullRequestForm{}), repo.MergePullRequest)
600600
})
601-
602-
}, mustAllowPulls, context.ReferencesGitRepo())
601+
}, mustAllowPulls, reqRepoReader(models.UnitTypeCode), context.ReferencesGitRepo())
603602
m.Group("/statuses", func() {
604603
m.Combo("/:sha").Get(repo.GetCommitStatuses).
605604
Post(reqToken(), bind(api.CreateStatusOption{}), repo.NewCommitStatus)

0 commit comments

Comments
 (0)