adding paths and placeholder for customer dash API

This commit is contained in:
Finn 2017-12-12 13:32:52 +00:00
parent e73c65d97b
commit 7d309755c6
3 changed files with 218 additions and 0 deletions

View file

@ -0,0 +1,21 @@
package Pear::LocalLoop::Controller::Api::V1::Customer;
use Mojo::Base 'Mojolicious::Controller';
sub auth {
my $c = shift;
return 1 if $c->stash->{api_user}->type eq 'customer';
$c->render(
json => {
success => Mojo::JSON->false,
message => 'Not an Customer',
error => 'user_not_cust',
},
status => 403,
);
return 0;
}
1;