Commit 02bfe08a authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

cgi: Shorter paths

parent 2505244d
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -33,10 +33,10 @@ get '/' => sub {
	if ( not $station ) {
		return $self->render;
	}
	$self->redirect_to("/multi/${station}");
	$self->redirect_to("/${station}");
} => 'index';

get '/multi/:station' => sub {
get '/:station' => sub {
	my $self    = shift;
	my $station = $self->stash('station');

@@ -73,6 +73,12 @@ get '/multi/:station' => sub {
	$self->render( text => $template->output );
};

get '/multi/:station' => sub {
	my $self = shift;
	my $station = $self->stash('station');
	$self->redirect_to("/${station}");
};

app->start();

__DATA__