diff options
author | Unknwon <u@gogs.io> | 2018-12-03 14:45:19 -0500 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2018-12-03 14:45:19 -0500 |
commit | 98114944fc325ece658c40bf4eba125238c47bd5 (patch) | |
tree | 5dc10c5a7e43f7a5a79c43a773f3627a0feb11af /routes/api/v1/repo/collaborators.go | |
parent | 6690023555e033ea25adb1f5bbcfac85d3ac9a25 (diff) |
vendor: update github.com/gogs/go-gogs-client
Bring fixes for #5538
Diffstat (limited to 'routes/api/v1/repo/collaborators.go')
-rw-r--r-- | routes/api/v1/repo/collaborators.go | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/routes/api/v1/repo/collaborators.go b/routes/api/v1/repo/collaborators.go index 4ccfd547..728b6d40 100644 --- a/routes/api/v1/repo/collaborators.go +++ b/routes/api/v1/repo/collaborators.go @@ -15,11 +15,7 @@ import ( func ListCollaborators(c *context.APIContext) { collaborators, err := c.Repo.Repository.GetCollaborators() if err != nil { - if errors.IsUserNotExist(err) { - c.Error(422, "", err) - } else { - c.Error(500, "GetCollaborators", err) - } + c.ServerError("GetCollaborators", err) return } @@ -27,7 +23,7 @@ func ListCollaborators(c *context.APIContext) { for i := range collaborators { apiCollaborators[i] = collaborators[i].APIFormat() } - c.JSON(200, &apiCollaborators) + c.JSONSuccess(&apiCollaborators) } func AddCollaborator(c *context.APIContext, form api.AddCollaboratorOption) { |