summaryrefslogtreecommitdiff
path: root/lib/Travelynx.pm
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2020-04-19 18:26:20 +0200
committerDaniel Friesel <derf@finalrewind.org>2020-04-19 18:26:20 +0200
commitf5fd6d42e11bc8f6a5bd84a3653a40fa03ed5497 (patch)
treea90e7c9cbee985ac44403fdcadb764c4966246ab /lib/Travelynx.pm
parent020fe826606e8d02d326c7de8a8df758588f424b (diff)
Add CSV Export
Diffstat (limited to 'lib/Travelynx.pm')
-rwxr-xr-xlib/Travelynx.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Travelynx.pm b/lib/Travelynx.pm
index 7495b76..285cfef 100755
--- a/lib/Travelynx.pm
+++ b/lib/Travelynx.pm
@@ -72,6 +72,7 @@ sub startup {
$self->defaults( layout => 'default' );
+ $self->types->type( csv => 'text/csv; charset=utf-8' );
$self->types->type( json => 'application/json; charset=utf-8' );
$self->plugin('Config');
@@ -4043,6 +4044,7 @@ sub startup {
$authed_r->get('/account/mail')->to('account#change_mail');
$authed_r->get('/export.json')->to('account#json_export');
$authed_r->get('/history.json')->to('traveling#json_history');
+ $authed_r->get('/history.csv')->to('traveling#csv_history');
$authed_r->get('/history')->to('traveling#history');
$authed_r->get('/history/commute')->to('traveling#commute');
$authed_r->get('/history/map')->to('traveling#map_history');