Skip to content

Commit

Permalink
chore: apply to other list states
Browse files Browse the repository at this point in the history
  • Loading branch information
SychO9 committed Nov 3, 2023
1 parent 61d1dc3 commit 72eded7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Notification from '../../common/models/Notification';

export default class NotificationListState extends PaginatedListState<Notification> {
constructor() {
super({}, 1, 20);
super({}, 1, null);
}

get type(): string {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ abstract class AbstractSerializeController implements RequestHandlerInterface
/**
* The number of records included by default.
*/
public int $limit = 20;
public int $limit = 40;

/**
* The fields that are available to be sorted by.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,10 @@ protected function data(ServerRequestInterface $request, Document $document): it
$areMoreResults = true;
}

$document->addPaginationLinks(
$this->addPaginationData(
$document,
$request,
$this->url->to('api')->route('notifications.index'),
$request->getQueryParams(),
$offset,
$limit,
$areMoreResults ? null : 0
);

Expand Down

0 comments on commit 72eded7

Please sign in to comment.