api/v1/import: hard-code backend_id to 1 (same as import form)
Closes #162 See also #170 (thanks to https://github.com/homologic for the suggestion)
This commit is contained in:
parent
325b6e206d
commit
f898088260
1 changed files with 7 additions and 4 deletions
|
@ -206,7 +206,9 @@ sub travel_v1 {
|
|||
return;
|
||||
}
|
||||
|
||||
if ( not $hafas and not $self->stations->search($from_station, iris => 1) ) {
|
||||
if ( not $hafas
|
||||
and not $self->stations->search( $from_station, backend_id => 1 ) )
|
||||
{
|
||||
$self->render(
|
||||
json => {
|
||||
success => \0,
|
||||
|
@ -221,7 +223,7 @@ sub travel_v1 {
|
|||
|
||||
if ( $to_station
|
||||
and not $hafas
|
||||
and not $self->stations->search($to_station, iris => 1) )
|
||||
and not $self->stations->search( $to_station, backend_id => 1 ) )
|
||||
{
|
||||
$self->render(
|
||||
json => {
|
||||
|
@ -530,6 +532,7 @@ sub import_v1 {
|
|||
),
|
||||
comment => sanitize( q{}, $payload->{comment} ),
|
||||
lax => $payload->{lax} ? 1 : 0,
|
||||
backend_id => 1,
|
||||
);
|
||||
|
||||
if ( $payload->{intermediateStops}
|
||||
|
|
Loading…
Reference in a new issue