Allow for per page setting for supplier list
This commit is contained in:
parent
5accf45cde
commit
51f0fb406e
1 changed files with 2 additions and 1 deletions
|
@ -12,6 +12,7 @@ sub post_lcc_transactions {
|
||||||
my $validation = $c->validation;
|
my $validation = $c->validation;
|
||||||
$validation->input($c->stash->{api_json});
|
$validation->input($c->stash->{api_json});
|
||||||
$validation->optional('page')->number;
|
$validation->optional('page')->number;
|
||||||
|
$validation->optional('per_page')->number;
|
||||||
|
|
||||||
return $c->api_validation_error if $validation->has_error;
|
return $c->api_validation_error if $validation->has_error;
|
||||||
|
|
||||||
|
@ -23,7 +24,7 @@ sub post_lcc_transactions {
|
||||||
undef,
|
undef,
|
||||||
{
|
{
|
||||||
page => $validation->param('page') || 1,
|
page => $validation->param('page') || 1,
|
||||||
rows => 10,
|
rows => $validation->param('per_page') || 10,
|
||||||
join => 'transaction',
|
join => 'transaction',
|
||||||
order_by => { -desc => 'transaction.purchase_time' },
|
order_by => { -desc => 'transaction.purchase_time' },
|
||||||
});
|
});
|
||||||
|
|
Reference in a new issue