summaryrefslogtreecommitdiff
path: root/lib/Travelynx/Controller/Traveling.pm
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2020-11-28 21:03:51 +0100
committerDaniel Friesel <derf@finalrewind.org>2020-11-28 21:03:51 +0100
commit77ecd6d034440d542ecba8e56c6d6917d73bf834 (patch)
treec0c187a0a0b1bdd8f2ce3dc9aa2e0095a53ee040 /lib/Travelynx/Controller/Traveling.pm
parentfe08e98067a181ea360532c18eff63a90a2687c0 (diff)
move statistics cache to a separate model class
Diffstat (limited to 'lib/Travelynx/Controller/Traveling.pm')
-rwxr-xr-xlib/Travelynx/Controller/Traveling.pm9
1 files changed, 7 insertions, 2 deletions
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
);