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