feat(account): Use new filterable function to support filtering

This commit is contained in:
Timothy Messier authored and Johan Brandhorst-Satzkorn committed 2022-04-20 13:32:31 -04:00
1 parent 3d58ce5f5c
commit 349e32afe4
1 file changed
+5 -1
@@ -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)
}
}