category purchase list fully grouped

This commit is contained in:
Finn 2018-01-24 13:19:35 +00:00
parent 6cd7df1259
commit ecbcd205fe

View file

@ -1,7 +1,7 @@
package Pear::LocalLoop::Controller::Api::Categories;
use Mojo::Base 'Mojolicious::Controller';
use List::Util qw/ max sum /;
use List::Util qw/ max /;
sub post_category_list {
my $c = shift;
@ -32,6 +32,7 @@ sub post_category_list {
category_id => 'category_id',
}
],
group_by => [ qw/ category_id quantised_weeks / ],
order_by => { '-desc' => 'quantised_weeks' },
}
);