diff options
Diffstat (limited to 'lib/Travelynx/Controller/Profile.pm')
| -rwxr-xr-x | lib/Travelynx/Controller/Profile.pm | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/lib/Travelynx/Controller/Profile.pm b/lib/Travelynx/Controller/Profile.pm index db30d36..8f3a1b2 100755 --- a/lib/Travelynx/Controller/Profile.pm +++ b/lib/Travelynx/Controller/Profile.pm @@ -114,7 +114,8 @@ sub profile { my $map_data = {}; if ( $status->{checked_in} ) { $map_data = $self->journeys_to_map_data( - journeys => [$status], + journeys => [$status], + with_now_markers => 1, ); } @@ -368,6 +369,21 @@ sub user_status { return; } + if ( not $ts =~ m{ ^ \d+ [.]? \d* $ }x ) { + $self->respond_to( + json => { + json => { error => 'bad request (invalid timestamp)' }, + status => 400, + }, + any => { + template => 'bad_request', + message => 'Invalid timestamp', + status => 400 + } + ); + return; + } + my $my_user; my $relation; my $inverse_relation; @@ -506,7 +522,8 @@ sub user_status { my $map_data = {}; if ( $status->{checked_in} ) { $map_data = $self->journeys_to_map_data( - journeys => [$status], + journeys => [$status], + with_now_markers => 1, ); } @@ -600,7 +617,8 @@ sub status_card { if ( $status->{checked_in} ) { $map_data = $self->journeys_to_map_data( - journeys => [$status], + journeys => [$status], + with_now_markers => 1, ); } |
