From 349e32afe4030faea56dd59d1e17d99bc621dabf Mon Sep 17 00:00:00 2001 From: Timothy Messier Date: Mon, 4 Apr 2022 11:52:26 -0400 Subject: [PATCH] feat(account): Use new filterable function to support filtering --- .../servers/controller/handlers/accounts/account_service.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/internal/servers/controller/handlers/accounts/account_service.go b/internal/servers/controller/handlers/accounts/account_service.go index b842aeba33..6336200a22 100644 --- a/internal/servers/controller/handlers/accounts/account_service.go +++ b/internal/servers/controller/handlers/accounts/account_service.go @@ -168,7 +168,11 @@ func (s Service) ListAccounts(ctx context.Context, req *pbs.ListAccountsRequest) // This comes last so that we can use item fields in the filter after // the allowed fields are populated above - if filter.Match(item) { + filterable, err := subtypes.Filterable(item) + if err != nil { + return nil, err + } + if filter.Match(filterable) { finalItems = append(finalItems, item) } }