Skip to content

Commit

Permalink
fix tree endpoint
Browse files Browse the repository at this point in the history
Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
  • Loading branch information
mteodor committed Nov 6, 2020
1 parent 9cffbac commit 98bef89
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion internal/groups/api/endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,6 @@ func buildGroupsResponseTree(page groups.GroupPage) groupPageRes {

for _, g := range groupsMap {
if children, ok := parentsMap[g.ID]; ok {
fmt.Printf("%s, array: %d\n", g.ID, len(children))
g.Children = children
}

Expand Down
4 changes: 2 additions & 2 deletions internal/groups/api/transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,12 +209,12 @@ func readBoolQuery(r *http.Request, key string) (bool, error) {
}

if len(vals) == 0 {
return true, nil
return false, nil
}

b, err := strconv.ParseBool(vals[0])
if err != nil {
return true, errInvalidQueryParams
return false, errInvalidQueryParams
}

return b, nil
Expand Down

0 comments on commit 98bef89

Please sign in to comment.