Skip to content

Commit

Permalink
fix: apply feedbacks
Browse files Browse the repository at this point in the history
  • Loading branch information
yassinedorbozgithub committed Jan 7, 2025
1 parent 718cec8 commit 7e227d0
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions api/src/utils/pagination/pagination-query.pipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,9 @@ export class PageQueryPipe<T>
let skip: number | undefined = undefined;
let limit: number | undefined = undefined;
if (value && 'limit' in value) {
skip =
value?.skip && parseInt(value.skip) > -1 ? parseInt(value.skip) : 0;
skip = value.skip && parseInt(value.skip) > -1 ? parseInt(value.skip) : 0;
limit =
value?.limit && parseInt(value.limit) > 0
value.limit && parseInt(value.limit) > 0
? parseInt(value.limit)
: config.pagination.limit;
}
Expand Down

0 comments on commit 7e227d0

Please sign in to comment.