Skip to content

Commit 17e5a6f

Browse files
committed
resolve coderabbit suggestions
1 parent a1f947b commit 17e5a6f

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

packages/server/src/api/rest/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1672,8 +1672,8 @@ class RequestHandler extends APIHandlerBase {
16721672
if (isNaN(limit) || limit <= 0) {
16731673
limit = pageSizeOption;
16741674
}
1675-
if (this.options.pageSize) {
1676-
limit = Math.min(this.options.pageSize, limit);
1675+
if (this.options.pageSize !== undefined) {
1676+
limit = Math.min(pageSizeOption, limit);
16771677
}
16781678
}
16791679

packages/server/tests/api/rest-largepagesize.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ describe('REST server tests - pagination over 100', () => {
3838
_handler({ ...args, zodSchemas, modelMeta, url: new URL(`http://localhost/${args.path}`) });
3939
});
4040

41-
it('returns only 15 items when limit set to 5', async () => {
41+
it('returns only 15 items when limit set to 15', async () => {
4242
// Create users first
4343
for (const i of Array(150).keys()) {
4444
await prisma.user.create({

0 commit comments

Comments
 (0)