summaryrefslogtreecommitdiff
path: root/lib/Travelynx/Controller
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Travelynx/Controller')
-rwxr-xr-xlib/Travelynx/Controller/Api.pm3
-rwxr-xr-xlib/Travelynx/Controller/Traveling.pm9
2 files changed, 9 insertions, 3 deletions
diff --git a/lib/Travelynx/Controller/Api.pm b/lib/Travelynx/Controller/Api.pm
index 3a2e100..5811c54 100755
--- a/lib/Travelynx/Controller/Api.pm
+++ b/lib/Travelynx/Controller/Api.pm
@@ -1,4 +1,5 @@
package Travelynx::Controller::Api;
+
# Copyright (C) 2020 Daniel Friesel
#
# SPDX-License-Identifier: MIT
@@ -547,7 +548,7 @@ sub import_v1 {
);
}
else {
- $self->journeys->invalidate_stats_cache(
+ $self->journey_stats_cache->invalidate(
ts => $opt{rt_departure},
db => $db,
uid => $uid
diff --git a/lib/Travelynx/Controller/Traveling.pm b/lib/Travelynx/Controller/Traveling.pm
index a1c9a7d..842af32 100755
--- a/lib/Travelynx/Controller/Traveling.pm
+++ b/lib/Travelynx/Controller/Traveling.pm
@@ -1,4 +1,5 @@
package Travelynx::Controller::Traveling;
+
# Copyright (C) 2020 Daniel Friesel
#
# SPDX-License-Identifier: MIT
@@ -917,7 +918,10 @@ sub yearly_history {
before => $interval_end,
with_datetime => 1
);
- $stats = $self->get_journey_stats( year => $year );
+ $stats = $self->journeys->get_stats(
+ uid => $self->current_user->{id},
+ year => $year
+ );
}
$self->respond_to(
@@ -979,7 +983,8 @@ sub monthly_history {
before => $interval_end,
with_datetime => 1
);
- $stats = $self->get_journey_stats(
+ $stats = $self->journeys->get_stats(
+ uid => $self->current_user->{id},
year => $year,
month => $month
);