diff options
author | Birte Kristina Friesel <derf@finalrewind.org> | 2023-08-24 21:26:00 +0200 |
---|---|---|
committer | Birte Kristina Friesel <derf@finalrewind.org> | 2023-08-24 21:26:00 +0200 |
commit | d313ca7fc1113e0e4a66415a000de27d8e5a3e81 (patch) | |
tree | ab1336ac1f6b21ad95bc7956a337983542949334 /lib/Travelynx/Helper | |
parent | d23283329df18171fbc0f965d42c9af37c175084 (diff) |
resolve unknown/ambiguous stop into list of stops
Diffstat (limited to 'lib/Travelynx/Helper')
-rw-r--r-- | lib/Travelynx/Helper/IRIS.pm | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/Travelynx/Helper/IRIS.pm b/lib/Travelynx/Helper/IRIS.pm index 4c286cb..a529e28 100644 --- a/lib/Travelynx/Helper/IRIS.pm +++ b/lib/Travelynx/Helper/IRIS.pm @@ -153,10 +153,12 @@ sub get_departures_p { return Mojo::Promise->reject( 'ambiguous station name', { - results => [], - errstr => - "Mehrdeutiger Stationsname: '$station'. Mögliche Eingaben: " - . join( q{, }, map { $_->[1] } @station_matches ), + results => [], + errstr => "Mehrdeutiger Stationsname: '$station'", + suggestions => [ + map { { name => $_->[1], eva => $_->[2] } } + @station_matches + ], } ); } |