From 66c1e6b0e8308068dbddaec03585f388875f4192 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Thu, 23 Mar 2017 14:28:31 -0400 Subject: user/settings: complete repositories panel (#4312) --- routers/api/v1/repo/collaborators.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'routers/api') 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) -- cgit v1.2.3