Skip to content

Commit

Permalink
refactor: fix schema
Browse files Browse the repository at this point in the history
Signed-off-by: JeffMboya <[email protected]>
  • Loading branch information
JeffMboya committed Jun 26, 2024
1 parent 6e104f3 commit 9c46985
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/groups/api/endpoints.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ func DisableGroupEndpoint(svc groups.Service) endpoint.Endpoint {
func ListGroupsEndpoint(svc groups.Service, groupType, memberKind string) endpoint.Endpoint {
return func(ctx context.Context, request interface{}) (interface{}, error) {
req := request.(listGroupsReq)
filterByID := req.Page.ID != ""

if memberKind != "" {
req.memberKind = memberKind
}
Expand All @@ -136,7 +138,6 @@ func ListGroupsEndpoint(svc groups.Service, groupType, memberKind string) endpoi
if req.tree {
return buildGroupsResponseTree(page), nil
}
filterByID := req.Page.ID != ""

if groupType == groupTypeChannels {
return buildChannelsResponse(page, filterByID), nil
Expand Down

0 comments on commit 9c46985

Please sign in to comment.