From 51f0fb406e9f804d7ef2c9259d30a58aead54315 Mon Sep 17 00:00:00 2001 From: Tom Bloor Date: Mon, 15 Jul 2019 10:03:44 +0100 Subject: [PATCH] Allow for per page setting for supplier list --- lib/Pear/LocalLoop/Controller/Api/External.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Pear/LocalLoop/Controller/Api/External.pm b/lib/Pear/LocalLoop/Controller/Api/External.pm index b34b1c0..79d9df4 100644 --- a/lib/Pear/LocalLoop/Controller/Api/External.pm +++ b/lib/Pear/LocalLoop/Controller/Api/External.pm @@ -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' }, });