summaryrefslogtreecommitdiff
path: root/lib/Travelynx.pm
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2023-01-22 11:34:53 +0100
committerDaniel Friesel <derf@finalrewind.org>2023-01-22 11:34:53 +0100
commit59e9a24aa63d0209ea301b2c4aa71687e8295be6 (patch)
treec8ead7e0f04abd4ca4090c59d9c7897ba75134b9 /lib/Travelynx.pm
parentaf82c46d576ac7d24801d1851ebcce1eb97390d5 (diff)
move get_api_token to users model
Diffstat (limited to 'lib/Travelynx.pm')
-rwxr-xr-xlib/Travelynx.pm26
1 files changed, 0 insertions, 26 deletions
diff --git a/lib/Travelynx.pm b/lib/Travelynx.pm
index c5c937d..9bd6ebe 100755
--- a/lib/Travelynx.pm
+++ b/lib/Travelynx.pm
@@ -169,11 +169,6 @@ sub startup {
};
}
);
- $self->attr(
- token_types => sub {
- return [qw(status history travel import)];
- }
- );
$self->attr(
account_public_mask => sub {
@@ -840,27 +835,6 @@ sub startup {
);
$self->helper(
- 'get_api_token' => sub {
- my ( $self, $uid ) = @_;
- $uid //= $self->current_user->{id};
-
- my $token = {};
- my $res = $self->pg->db->select(
- 'tokens',
- [ 'type', 'token' ],
- { user_id => $uid }
- );
-
- for my $entry ( $res->hashes->each ) {
- $token->{ $self->app->token_types->[ $entry->{type} - 1 ] }
- = $entry->{token};
- }
-
- return $token;
- }
- );
-
- $self->helper(
'run_hook' => sub {
my ( $self, $uid, $reason, $callback ) = @_;