Allow for per page setting for supplier list

This commit is contained in:
Tom Bloor 2019-07-15 10:03:44 +01:00
parent 64fb64385d
commit e59322cbaa

View file

@ -12,6 +12,7 @@ sub post_lcc_transactions {
my $validation = $c->validation;
$validation->input($c->stash->{api_json});
$validation->optional('page')->number;
$validation->optional('per_page')->number;
return $c->api_validation_error if $validation->has_error;
@ -23,7 +24,7 @@ sub post_lcc_transactions {
undef,
{
page => $validation->param('page') || 1,
rows => 10,
rows => $validation->param('per_page') || 10,
join => 'transaction',
order_by => { -desc => 'transaction.purchase_time' },
});