This commit is contained in:
James Cole
2025-11-01 18:44:32 +01:00
parent a941dca5e1
commit 8ff40e22e0
6 changed files with 11 additions and 13 deletions

View File

@@ -68,12 +68,10 @@ class PaginationRequest extends ApiRequest
$user = auth()->user();
$limit = (int)Preferences::getForUser($user, 'listPageSize', 50)->data;
}
$page = $this->convertInteger('page');
$page = min(max(1, $page), 2 ** 16);
$offset = ($page - 1) * $limit;
$sort = $this->sortClass ? $this->convertSortParameters('sort', $this->sortClass) : $this->get('sort');
$this->attributes->set('limit', $limit);
$this->attributes->set('sort', $sort);
$this->attributes->set('page', $page);