Skip to content

Commit

Permalink
fix: add accountId to client select and criteria
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanvanherwijnen committed Nov 12, 2024
1 parent 17de7b0 commit 110762d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/api/src/repositories/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ const defaultSelect = [
'country',
'vatIdNumber',
'email',
'postalCode'
'postalCode',
'accountId'
] as (keyof Client)[]

function find({
Expand Down Expand Up @@ -58,6 +59,10 @@ function find({
)
}

if (criteria.accountId) {
query = query.where('accountId', '=', criteria.accountId)
}

if (pagination) {
if (pagination.sortBy)
query = query.orderBy(
Expand Down

0 comments on commit 110762d

Please sign in to comment.