aboutsummaryrefslogtreecommitdiff
path: root/routers/api/v1
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2017-03-23 14:28:31 -0400
committerUnknwon <u@gogs.io>2017-03-23 14:28:31 -0400
commit66c1e6b0e8308068dbddaec03585f388875f4192 (patch)
tree1b34d0977ddd45ca2e6db84fb7939f874b04af2a /routers/api/v1
parentbeee6e03b15e594f396fb2fb769b58e543ef1794 (diff)
user/settings: complete repositories panel (#4312)
Diffstat (limited to 'routers/api/v1')
-rw-r--r--routers/api/v1/repo/collaborators.go8
1 files changed, 1 insertions, 7 deletions
diff --git a/routers/api/v1/repo/collaborators.go b/routers/api/v1/repo/collaborators.go
index f240661f..c3af5bbc 100644
--- a/routers/api/v1/repo/collaborators.go
+++ b/routers/api/v1/repo/collaborators.go
@@ -67,13 +67,7 @@ func IsCollaborator(ctx *context.APIContext) {
return
}
- is, err := ctx.Repo.Repository.IsCollaborator(collaborator.ID)
- if err != nil {
- ctx.Error(500, "IsCollaboration", err)
- return
- }
-
- if !is {
+ if !ctx.Repo.Repository.IsCollaborator(collaborator.ID) {
ctx.Status(404)
} else {
ctx.Status(204)