Added debug code
This commit is contained in:
parent
c967098d05
commit
1f23c616f7
1 changed files with 4 additions and 1 deletions
|
@ -66,12 +66,15 @@ post '/register' => sub {
|
|||
|
||||
my $account = $self->get_account_by_username( $json->{username} );
|
||||
|
||||
$self->app->log->debug( "Account: " . Dumper $account );
|
||||
$self->app->log->debug( "JSON: " . Dumper $json );
|
||||
|
||||
unless ( defined $account ) {
|
||||
return $self->render( json => {
|
||||
success => Mojo::JSON->false,
|
||||
message => 'Username not recognised, has your token expired?',
|
||||
});
|
||||
} elsif ( $account->{keyused} eq 't' ) {
|
||||
} elsif ( $account->{keyused} ) {
|
||||
return $self->render( json => {
|
||||
success => Mojo::JSON->false,
|
||||
message => 'Token has already been used',
|
||||
|
|
Reference in a new issue