Commit ab3318c5 authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

index: suddort via list delimited with commas

parent 1f306b3a
Loading
Loading
Loading
Loading
+20 −12
Original line number Diff line number Diff line
@@ -403,6 +403,7 @@ sub handle_request {
		my $line     = $result->line;
		my $delay    = $result->delay;
		if ( $via and $result->can('route_post') ) {
			$via =~ s{ , \s* }{|}gx;
			my @route = $result->route_post;
			if ( not( List::MoreUtils::any { m{$via}i } @route ) ) {
				next;
@@ -813,7 +814,11 @@ get '/_redirect' => sub {
get '/_auto' => sub {
	my $self = shift;

	$self->render('geolocation', with_geolocation => 1, hide_opts => 1);
	$self->render(
		'geolocation',
		with_geolocation => 1,
		hide_opts        => 1
	);
};

post '/_geolocation' => sub {
@@ -835,10 +840,13 @@ post '/_geolocation' => sub {
				lat      => $_->[0][4],
				distance => $_->[1],
			}
		} Travel::Status::DE::IRIS::Stations::get_station_by_location($lon, $lat, 10);
		$self->render(json => {
		  } Travel::Status::DE::IRIS::Stations::get_station_by_location( $lon,
			$lat, 10 );
		$self->render(
			json => {
				candidates => [@candidates],
		});
			}
		);
	}
};