Skip to content

Commit

Permalink
Correct pagination
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobemerick committed Jun 12, 2016
1 parent 2655442 commit e43d038
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Controller/Comment.php
Expand Up @@ -177,7 +177,7 @@ public function getComments(Request $req, Response $res)
$limit = $query['per_page'];
}
if (array_key_exists('page', $query)) {
$offset = $query['page'] * $query['per_page'];
$offset = ($query['page'] - 1) * $query['per_page'];
}
if (array_key_exists('domain', $query)) {
$domain = $query['domain'];
Expand Down

0 comments on commit e43d038

Please sign in to comment.