diff options
author | Birte Kristina Friesel <derf@finalrewind.org> | 2025-03-23 18:07:50 +0100 |
---|---|---|
committer | Birte Kristina Friesel <derf@finalrewind.org> | 2025-03-23 18:07:50 +0100 |
commit | a9b5a18943c3e2070703e745cd1131a02fd20365 (patch) | |
tree | b65552c1a4a28e66811be19c5ec03e53fadc5600 /lib/Travelynx/Model/Users.pm | |
parent | 5ef9ef68529bb77d79aa4529c48c8de328232186 (diff) |
Preliminary DBRIS support (not user-accessible yet)
working:
* checkin
* checkout
* realtime data
* polylines
* carriage formation (long-distance only)
to do:
* geolocation
* redirects after checkout / undo
* traewelling sync
* use dbris by default
Diffstat (limited to 'lib/Travelynx/Model/Users.pm')
-rw-r--r-- | lib/Travelynx/Model/Users.pm | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/Travelynx/Model/Users.pm b/lib/Travelynx/Model/Users.pm index 7d3777b..e3d6f7a 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, hafas, dbris', { id => $uid } )->hash; if ($user) { @@ -453,6 +457,7 @@ sub get { : undef, backend_id => $user->{backend_id}, backend_name => $user->{backend_name}, + backend_dbris => $user->{dbris}, backend_hafas => $user->{hafas}, }; } |