Skip to content
This repository has been archived by the owner on Jun 3, 2022. It is now read-only.

Commit

Permalink
Increased pagination max size from 60 to 100 (#450)
Browse files Browse the repository at this point in the history
* Increased pagination max size from 60 to 100

* Updated e2e test for paginated list max size
  • Loading branch information
joeldavidw authored Oct 8, 2021
1 parent 50b3a2c commit 9a2ea8c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions packages/whale-api-client/__tests__/api/blocks.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ describe('list', () => {
expect(last.hasNext).toStrictEqual(false)
})

it('should get paginated list of 60 even if request page size is more than 60', async () => {
const first = await client.blocks.list(100)
it('should get paginated list of 100 even if request page size is more than 100', async () => {
const first = await client.blocks.list(150)

expect(first.length).toStrictEqual(60)
expect(first.length).toStrictEqual(100)
expect(first[0]).toStrictEqual(ExpectedBlock)
})

Expand Down
2 changes: 1 addition & 1 deletion src/module.api/_core/api.query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { Type, Transform } from 'class-transformer'
export class PaginationQuery {
@IsOptional()
@IsInt()
@Transform(({ value }) => value > 60 ? 60 : value)
@Transform(({ value }) => value > 100 ? 100 : value)
@Min(0)
@Type(() => Number)
size: number = 30
Expand Down

0 comments on commit 9a2ea8c

Please sign in to comment.