Skip to content

Commit

Permalink
pagination fix for unincluded
Browse files Browse the repository at this point in the history
  • Loading branch information
mkeen committed Jan 5, 2022
1 parent 8ace0d9 commit e67f5cb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/controllers/helpers.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
'use strict';

export const paginationParams = (page, limit) => {
if (page === undefined || limit === undefined) {
return {
page: undefined,
limit: undefined,
}
}

if (page < 1) {
page = 1;
}
Expand Down

0 comments on commit e67f5cb

Please sign in to comment.