Link Here
|
57 |
|
57 |
|
58 |
my $total = $args->{total}; |
58 |
my $total = $args->{total}; |
59 |
my $req_page = $args->{params}->{page}; |
59 |
my $req_page = $args->{params}->{page}; |
60 |
my $per_page = $args->{params}->{per_page}; |
60 |
my $per_page = $args->{params}->{per_page} // |
|
|
61 |
C4::Context->preference('RESTdefaultPageSize'); |
62 |
|
63 |
# do we need to paginate? |
64 |
return $c unless $req_page; |
61 |
|
65 |
|
62 |
my $pages = int $total / $per_page; |
66 |
my $pages = int $total / $per_page; |
63 |
$pages++ |
67 |
$pages++ |
64 |
- |
|
|