Skip to content

Commit

Permalink
fix: pagination offset calc
Browse files Browse the repository at this point in the history
  • Loading branch information
mkeen committed Jan 5, 2022
1 parent c38659c commit ccb6d34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/controllers/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const paginationParams = (page, limit) => {

return {
limit: limit ? limit : 15,
offset: page ? page - 1 : 1,
offset: (page ? page - 1 : 0) * limit,
}
}

Expand Down

0 comments on commit ccb6d34

Please sign in to comment.