summaryrefslogtreecommitdiff
path: root/lib/Travelynx/Model/Journeys.pm
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2025-06-21 20:48:53 +0200
committerBirte Kristina Friesel <derf@finalrewind.org>2025-06-21 20:48:53 +0200
commitda87e97a0b954860e0a53b8a0f475580d44ad73d (patch)
tree3626df8b8792df43fcb0edf266059f70fbb92573 /lib/Travelynx/Model/Journeys.pm
parentca2226b9238ac2159d0001a071edf33915f062ae (diff)
Add bare-bones support for manual checkins (still bound to a specific backend)
Extension opportunities (maybe, eventually) * provide datetimes of intermediate stops * provide an API for real-time data updates * look up stops that travelynx does not yet know about rather than rejecting them outright
Diffstat (limited to 'lib/Travelynx/Model/Journeys.pm')
-rwxr-xr-xlib/Travelynx/Model/Journeys.pm8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/Travelynx/Model/Journeys.pm b/lib/Travelynx/Model/Journeys.pm
index 0fb663e..876786a 100755
--- a/lib/Travelynx/Model/Journeys.pm
+++ b/lib/Travelynx/Model/Journeys.pm
@@ -283,8 +283,14 @@ sub add_from_in_transit {
my $db = $opt{db};
my $journey = $opt{journey};
+ if ( $journey->{train_id} eq 'manual' ) {
+ $journey->{edited} = 0x3fff;
+ }
+ else {
+ $journey->{edited} = 0;
+ }
+
delete $journey->{data};
- $journey->{edited} = 0;
$journey->{checkout_time} = DateTime->now( time_zone => 'Europe/Berlin' );
return $db->insert( 'journeys', $journey, { returning => 'id' } )