summaryrefslogtreecommitdiff
path: root/lib/Travelynx/Controller/Api.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Travelynx/Controller/Api.pm')
-rwxr-xr-xlib/Travelynx/Controller/Api.pm12
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/Travelynx/Controller/Api.pm b/lib/Travelynx/Controller/Api.pm
index 8af57be..6ffd310 100755
--- a/lib/Travelynx/Controller/Api.pm
+++ b/lib/Travelynx/Controller/Api.pm
@@ -492,18 +492,18 @@ sub import_v1 {
my $tx = $db->begin;
$opt{db} = $db;
- my ( $journey_id, $error ) = $self->add_journey(%opt);
+ my ( $journey_id, $error ) = $self->journeys->add(%opt);
my $journey;
if ( not $error ) {
- $journey = $self->get_journey(
+ $journey = $self->journeys->get_single(
uid => $uid,
db => $db,
journey_id => $journey_id,
verbose => 1
);
$error
- = $self->journey_sanity_check( $journey, $payload->{lax} ? 1 : 0 );
+ = $self->journeys->sanity_check( $journey, $payload->{lax} ? 1 : 0 );
}
if ($error) {
@@ -526,7 +526,11 @@ sub import_v1 {
);
}
else {
- $self->invalidate_stats_cache( $opt{rt_departure}, $db, $uid );
+ $self->journeys->invalidate_stats_cache(
+ ts => $opt{rt_departure},
+ db => $db,
+ uid => $uid
+ );
$tx->commit;
$self->render(
json => {