Format
This commit is contained in:
parent
bec21ff3e0
commit
a0dd7dd174
46 changed files with 138 additions and 139 deletions
|
@ -124,6 +124,8 @@ sub post_login {
|
|||
sub post_logout {
|
||||
my $c = shift;
|
||||
|
||||
print STDERR "TEST";
|
||||
|
||||
my $session_key = $c->req->json('/session_key');
|
||||
|
||||
my $session_result =
|
||||
|
@ -139,7 +141,7 @@ sub post_logout {
|
|||
message => 'Logged Out',
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -9,10 +9,6 @@ use Carp;
|
|||
|
||||
has error_messages => sub {
|
||||
return {
|
||||
#devicetokens => {
|
||||
# required => { message => 'Device token is required', status => 400 },
|
||||
# in_resultset => { message => 'Device token not found', status => 400 },
|
||||
#},
|
||||
topic => {
|
||||
required => { message => 'Topic is required', status => 400 },
|
||||
},
|
||||
|
@ -27,12 +23,8 @@ has error_messages => sub {
|
|||
};
|
||||
};
|
||||
|
||||
=begin comment
|
||||
Credit: Peter Scott/StackOverflow
|
||||
https://stackoverflow.com/a/53357961/4580273
|
||||
Credit: jeffez/StackOverflow
|
||||
https://stackoverflow.com/q/56556438/4580273
|
||||
=cut
|
||||
# Credit: Peter Scott/StackOverflow https://stackoverflow.com/a/53357961/4580273
|
||||
# Credit: jeffez/StackOverflow https://stackoverflow.com/q/56556438/4580273
|
||||
|
||||
my $jwt = create_jwt_from_path_and_scopes( './localspend-47012.json',
|
||||
'email https://www.googleapis.com/auth/cloud-platform' );
|
||||
|
@ -104,7 +96,6 @@ sub post_message {
|
|||
my $validation = $c->validation;
|
||||
$validation->input( $c->stash->{api_json} );
|
||||
|
||||
#$validation->required('devicetokens')->in_resultset('token', $c->schema->resultset('DeviceToken'));
|
||||
$validation->required('topic');
|
||||
$validation->required('sender')
|
||||
->in_resultset( 'name', $c->schema->resultset('Organisation') );
|
||||
|
|
|
@ -460,12 +460,11 @@ sub post_leaderboards {
|
|||
my @leaderboard_array = $today_values->all;
|
||||
|
||||
if ( $validation->param('type') =~ /total$/ ) {
|
||||
## no critic (ValuesAndExpressions::ProhibitCommaSeparatedStatements)
|
||||
## no critic (ValuesAndExpressions::ProhibitCommaSeparatedStatements)
|
||||
@leaderboard_array = (
|
||||
map {
|
||||
{
|
||||
%$_,
|
||||
value => $_->{value} / 100000
|
||||
%$_, value => $_->{value} / 100000
|
||||
}
|
||||
} @leaderboard_array
|
||||
);
|
||||
|
@ -545,7 +544,7 @@ sub post_leaderboards_paged {
|
|||
$values_count = $today_values->pager->total_entries;
|
||||
|
||||
if ( $validation->param('type') =~ /total$/ ) {
|
||||
## no critic (ValuesAndExpressions::ProhibitCommaSeparatedStatements)
|
||||
## no critic (ValuesAndExpressions::ProhibitCommaSeparatedStatements)
|
||||
@leaderboard_array = (
|
||||
map {
|
||||
{
|
||||
|
|
|
@ -122,7 +122,7 @@ sub idx {
|
|||
}
|
||||
},
|
||||
);
|
||||
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -206,7 +206,7 @@ sub trail_load {
|
|||
}
|
||||
},
|
||||
);
|
||||
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue