Added new stats and fixed test

This commit is contained in:
Finn 2017-12-14 20:30:44 +00:00
parent b9a57c7dcb
commit c4b7fa5102
5 changed files with 97 additions and 116 deletions

View file

@ -0,0 +1,28 @@
package Pear::LocalLoop::Controller::Api::V1::Customer::Pies;
use Mojo::Base 'Mojolicious::Controller';
sub index {
my $c = shift;
my $entity = $c->stash->{api_user}->entity;
my $data = { data => [] };
my $data = {
'Local shop local purchaser' => 20,
'Local shop non-local purchaser' => 20,
'Non-local shop local purchaser' => 20,
'Non-local shop non-local purchaser' => 20,
};
#TODO insert code fetching numbers here
return $c->render(
json => {
success => Mojo::JSON->true,
pie => $data,
}
);
}
1;