diff options
author | Unknwon <u@gogs.io> | 2017-03-23 14:28:31 -0400 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2017-03-23 14:28:31 -0400 |
commit | 66c1e6b0e8308068dbddaec03585f388875f4192 (patch) | |
tree | 1b34d0977ddd45ca2e6db84fb7939f874b04af2a /routers/api/v1 | |
parent | beee6e03b15e594f396fb2fb769b58e543ef1794 (diff) |
user/settings: complete repositories panel (#4312)
Diffstat (limited to 'routers/api/v1')
-rw-r--r-- | routers/api/v1/repo/collaborators.go | 8 |
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) |