Api: section headers for helpers / controllers; perltidy
This commit is contained in:
parent
0e01485952
commit
aa19f4b00c
1 changed files with 12 additions and 8 deletions
|
@ -10,6 +10,8 @@ use List::Util;
|
||||||
use Travel::Status::DE::IRIS::Stations;
|
use Travel::Status::DE::IRIS::Stations;
|
||||||
use UUID::Tiny qw(:std);
|
use UUID::Tiny qw(:std);
|
||||||
|
|
||||||
|
# Internal Helpers
|
||||||
|
|
||||||
sub make_token {
|
sub make_token {
|
||||||
return create_uuid_as_string(UUID_V4);
|
return create_uuid_as_string(UUID_V4);
|
||||||
}
|
}
|
||||||
|
@ -28,6 +30,8 @@ sub sanitize {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Contollers
|
||||||
|
|
||||||
sub documentation {
|
sub documentation {
|
||||||
my ($self) = @_;
|
my ($self) = @_;
|
||||||
|
|
||||||
|
@ -236,7 +240,7 @@ sub travel_v1 {
|
||||||
$self->render(
|
$self->render(
|
||||||
json => {
|
json => {
|
||||||
success => \0,
|
success => \0,
|
||||||
error =>
|
error =>
|
||||||
'Error requesting departures from fromStation: '
|
'Error requesting departures from fromStation: '
|
||||||
. $status->{errstr},
|
. $status->{errstr},
|
||||||
status => $self->get_user_status_json_v1($uid)
|
status => $self->get_user_status_json_v1($uid)
|
||||||
|
@ -457,13 +461,13 @@ sub import_v1 {
|
||||||
}
|
}
|
||||||
|
|
||||||
%opt = (
|
%opt = (
|
||||||
uid => $uid,
|
uid => $uid,
|
||||||
train_type => sanitize( q{}, $payload->{train}{type} ),
|
train_type => sanitize( q{}, $payload->{train}{type} ),
|
||||||
train_no => sanitize( q{}, $payload->{train}{no} ),
|
train_no => sanitize( q{}, $payload->{train}{no} ),
|
||||||
train_line => sanitize( q{}, $payload->{train}{line} ),
|
train_line => sanitize( q{}, $payload->{train}{line} ),
|
||||||
cancelled => $payload->{cancelled} ? 1 : 0,
|
cancelled => $payload->{cancelled} ? 1 : 0,
|
||||||
dep_station => sanitize( q{}, $payload->{fromStation}{name} ),
|
dep_station => sanitize( q{}, $payload->{fromStation}{name} ),
|
||||||
arr_station => sanitize( q{}, $payload->{toStation}{name} ),
|
arr_station => sanitize( q{}, $payload->{toStation}{name} ),
|
||||||
sched_departure =>
|
sched_departure =>
|
||||||
sanitize( 0, $payload->{fromStation}{scheduledTime} ),
|
sanitize( 0, $payload->{fromStation}{scheduledTime} ),
|
||||||
rt_departure => sanitize(
|
rt_departure => sanitize(
|
||||||
|
|
Loading…
Reference in a new issue