Added new stats and fixed test
This commit is contained in:
parent
b9a57c7dcb
commit
c4b7fa5102
5 changed files with 97 additions and 116 deletions
28
lib/Pear/LocalLoop/Controller/Api/V1/Customer/Pies.pm
Normal file
28
lib/Pear/LocalLoop/Controller/Api/V1/Customer/Pies.pm
Normal 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;
|
Reference in a new issue