Journey->add_from_in_transit: return ID of added journey

This commit is contained in:
Derf Null 2023-06-28 22:21:51 +02:00
parent c7fedb9e42
commit 00ee3de6c1
No known key found for this signature in database
GPG key ID: 19E6E524EBB177BA

View file

@ -254,7 +254,8 @@ sub add_from_in_transit {
$journey->{edited} = 0;
$journey->{checkout_time} = DateTime->now( time_zone => 'Europe/Berlin' );
$db->insert( 'journeys', $journey );
return $db->insert( 'journeys', $journey, { returning => 'id' } )
->hash->{id};
}
sub update {