diff options
author | Daniel Friesel <derf@finalrewind.org> | 2019-03-22 16:56:49 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2019-03-22 16:56:49 +0100 |
commit | 32cc2f0f81c45e913d2cf44524a7676315719549 (patch) | |
tree | 806d9beba2c0e05c90cabcbd99bf683fee240b5a /lib/Travelynx/Controller/Api.pm | |
parent | 0243a114b43c9c533a99c7f562c0e57d3a66671f (diff) |
More refactoring
Diffstat (limited to 'lib/Travelynx/Controller/Api.pm')
-rwxr-xr-x | lib/Travelynx/Controller/Api.pm | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/lib/Travelynx/Controller/Api.pm b/lib/Travelynx/Controller/Api.pm index 435c644..c3eccb8 100755 --- a/lib/Travelynx/Controller/Api.pm +++ b/lib/Travelynx/Controller/Api.pm @@ -4,13 +4,6 @@ use Mojo::Base 'Mojolicious::Controller'; use Travel::Status::DE::IRIS::Stations; use UUID::Tiny qw(:std); -my %token_type = ( - status => 1, - history => 2, - action => 3, -); -my @token_types = (qw(status history action)); - sub make_token { return create_uuid_as_string(UUID_V4); } @@ -105,7 +98,7 @@ sub set_token { return; } my $token = make_token(); - my $token_id = $token_type{ $self->param('token') }; + my $token_id = $self->app->token_type->{ $self->param('token') }; if ( not $token_id ) { $self->redirect_to('account'); |