Skip to content

Commit

Permalink
Fix total clients
Browse files Browse the repository at this point in the history
Signed-off-by: nyagamunene <[email protected]>
  • Loading branch information
nyagamunene committed Aug 1, 2024
1 parent b329a41 commit c80870c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion users/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -547,11 +547,12 @@ func (svc service) ListMembers(ctx context.Context, token, objectKind, objectID
if nameQuery != "" {
filteredClients := make([]mgclients.Client, 0, len(cp.Clients))
for _, c := range cp.Clients {
if strings.Contains(c.Name, nameQuery) {
if strings.Contains(strings.ToLower(c.Name), strings.ToLower(nameQuery)) {
filteredClients = append(filteredClients, c)
}
}
cp.Clients = filteredClients
cp.Total = uint64(len(filteredClients))
}

if pm.ListPerms && len(cp.Clients) > 0 {
Expand Down

0 comments on commit c80870c

Please sign in to comment.