Add limit param to all endpoints

This commit is contained in:
James Cole
2023-10-05 18:52:01 +02:00
parent a29d056a9b
commit 664a08d42f
46 changed files with 136 additions and 138 deletions

View File

@@ -137,6 +137,11 @@ abstract class Controller extends BaseController
if (null !== $value) {
$bag->set($integer, (int)$value);
}
if (null === $value && 'limit' === $integer) {
// set default for user:
$pageSize = (int)app('preferences')->getForUser(auth()->user(), 'listPageSize', 50)->data;
$bag->set($integer, $pageSize);
}
}
// sort fields: