aboutsummaryrefslogtreecommitdiff
path: root/routers/api/v1/repo/collaborators.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/api/v1/repo/collaborators.go')
-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)