summaryrefslogtreecommitdiffstats
path: root/routers/api/v1/org/team.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/api/v1/org/team.go')
-rw-r--r--routers/api/v1/org/team.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/routers/api/v1/org/team.go b/routers/api/v1/org/team.go
index eead7dd8fd..b999d62aa1 100644
--- a/routers/api/v1/org/team.go
+++ b/routers/api/v1/org/team.go
@@ -176,7 +176,11 @@ func GetTeamMembers(ctx *context.APIContext) {
// responses:
// "200":
// "$ref": "#/responses/UserList"
- if !models.IsOrganizationMember(ctx.Org.Team.OrgID, ctx.User.ID) {
+ isMember, err := models.IsOrganizationMember(ctx.Org.Team.OrgID, ctx.User.ID)
+ if err != nil {
+ ctx.Error(500, "IsOrganizationMember", err)
+ return
+ } else if !isMember {
ctx.Status(404)
return
}