Skip to content

Commit

Permalink
fix: fix count fn of Resource
Browse files Browse the repository at this point in the history
  • Loading branch information
JanSmolko authored and dziraf committed Jun 7, 2023
1 parent 71638b9 commit b017f8a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Resource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export class Resource extends BaseResource {
const qb = this.getQueryBuilder();
convertFilter(qb, filter);

const result = await qb.count() as any;
const result = await qb.count({ count: '*' }).first() as any;

return result?.count ? Number(result.count) : 0;
}
Expand Down

0 comments on commit b017f8a

Please sign in to comment.