summaryrefslogtreecommitdiff
path: root/lib/Travelynx/Model/Users.pm
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2025-01-08 18:11:28 +0100
committerBirte Kristina Friesel <derf@finalrewind.org>2025-01-08 18:11:28 +0100
commit42f9a00d98dbd675234c05b3e25c3e722cfdd7ba (patch)
treecc27bb0a0746c19829d607e14e6cd39537997ad4 /lib/Travelynx/Model/Users.pm
parent35660567614dea8d4572bcfe5bb1890504be0c20 (diff)
EFA support (WiP)efa-support
Diffstat (limited to 'lib/Travelynx/Model/Users.pm')
-rw-r--r--lib/Travelynx/Model/Users.pm9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/Travelynx/Model/Users.pm b/lib/Travelynx/Model/Users.pm
index 7d3777b..a672a38 100644
--- a/lib/Travelynx/Model/Users.pm
+++ b/lib/Travelynx/Model/Users.pm
@@ -209,7 +209,11 @@ sub set_backend {
my ( $self, %opt ) = @_;
$opt{db} //= $self->{pg}->db;
- $opt{db}->update('users', {backend_id => $opt{backend_id}}, {id => $opt{uid}});
+ $opt{db}->update(
+ 'users',
+ { backend_id => $opt{backend_id} },
+ { id => $opt{uid} }
+ );
}
sub set_privacy {
@@ -414,7 +418,7 @@ sub get {
. 'extract(epoch from registered_at) as registered_at_ts, '
. 'extract(epoch from last_seen) as last_seen_ts, '
. 'extract(epoch from deletion_requested) as deletion_requested_ts, '
- . 'backend_id, backend_name, hafas',
+ . 'backend_id, backend_name, efa, hafas',
{ id => $uid }
)->hash;
if ($user) {
@@ -453,6 +457,7 @@ sub get {
: undef,
backend_id => $user->{backend_id},
backend_name => $user->{backend_name},
+ backend_efa => $user->{efa},
backend_hafas => $user->{hafas},
};
}