feat(account): Use new filterable function to support filtering
This commit is contained in:
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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user