Skip to content

Commit

Permalink
fix: remove unused gorup
Browse files Browse the repository at this point in the history
  • Loading branch information
sguiheux committed Sep 24, 2021
1 parent e23776d commit 9cc973d
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions engine/api/group.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ func (api *API) getGroupsHandler() service.Handler {
var groups []sdk.Group
var err error

withoutDefault := service.FormBool(r, "withoutDefault")
if isMaintainer(ctx) {
groups, err = group.LoadAll(ctx, api.mustDB())
} else {
Expand All @@ -30,15 +29,6 @@ func (api *API) getGroupsHandler() service.Handler {
return err
}

// withoutDefault is use by project add, to avoid selecting the default group on project creation
if withoutDefault {
var filteredGroups []sdk.Group
for _, g := range groups {
filteredGroups = append(filteredGroups, g)
}
return service.WriteJSON(w, filteredGroups, http.StatusOK)
}

return service.WriteJSON(w, groups, http.StatusOK)
}
}
Expand Down

0 comments on commit 9cc973d

Please sign in to comment.