From 98bef89be084655ab608f596b974c227e797e88b Mon Sep 17 00:00:00 2001 From: Mirko Teodorovic Date: Fri, 6 Nov 2020 15:27:38 +0100 Subject: [PATCH] fix tree endpoint Signed-off-by: Mirko Teodorovic --- internal/groups/api/endpoint.go | 1 - internal/groups/api/transport.go | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/internal/groups/api/endpoint.go b/internal/groups/api/endpoint.go index f4a722f60cb..f173e0ef6b3 100644 --- a/internal/groups/api/endpoint.go +++ b/internal/groups/api/endpoint.go @@ -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 } diff --git a/internal/groups/api/transport.go b/internal/groups/api/transport.go index 5d7d5683268..35ae471d822 100644 --- a/internal/groups/api/transport.go +++ b/internal/groups/api/transport.go @@ -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