Loading lib/Travel/Status/DE/DBWagenreihung.pm +12 −7 Original line number Diff line number Diff line Loading @@ -30,6 +30,7 @@ sub new { developer_mode => $opt{developer_mode}, cache => $opt{cache}, departure => $opt{departure}, from_json => $opt{from_json}, json => JSON->new, serializable => $opt{serializable}, train_number => $opt{train_number}, Loading Loading @@ -62,6 +63,9 @@ sub get_wagonorder { $datetime = $datetime->strftime('%Y%m%d%H%M'); } my $json = $self->{from_json}; if ( not $json ) { my ( $content, $err ) = $self->get_with_cache( $cache, "${api_base}/${train_number}/${datetime}" ); Loading @@ -70,7 +74,8 @@ sub get_wagonorder { $self->{errstr} = "Failed to fetch station data: $err"; return; } my $json = $self->{json}->utf8->decode($content); $json = $self->{json}->utf8->decode($content); } if ( exists $json->{error} ) { $self->{errstr} = 'Backend error: ' . $json->{error}{msg}; Loading Loading
lib/Travel/Status/DE/DBWagenreihung.pm +12 −7 Original line number Diff line number Diff line Loading @@ -30,6 +30,7 @@ sub new { developer_mode => $opt{developer_mode}, cache => $opt{cache}, departure => $opt{departure}, from_json => $opt{from_json}, json => JSON->new, serializable => $opt{serializable}, train_number => $opt{train_number}, Loading Loading @@ -62,6 +63,9 @@ sub get_wagonorder { $datetime = $datetime->strftime('%Y%m%d%H%M'); } my $json = $self->{from_json}; if ( not $json ) { my ( $content, $err ) = $self->get_with_cache( $cache, "${api_base}/${train_number}/${datetime}" ); Loading @@ -70,7 +74,8 @@ sub get_wagonorder { $self->{errstr} = "Failed to fetch station data: $err"; return; } my $json = $self->{json}->utf8->decode($content); $json = $self->{json}->utf8->decode($content); } if ( exists $json->{error} ) { $self->{errstr} = 'Backend error: ' . $json->{error}{msg}; Loading