remove "given" stuff

This commit is contained in:
Aaron Bieber 2023-08-31 07:45:45 -06:00
parent 325a9b7f7d
commit d0ff7f02f1
No known key found for this signature in database

View File

@ -8,8 +8,6 @@ use strict;
use Time::HiRes qw(time); use Time::HiRes qw(time);
use File::Basename; use File::Basename;
use feature 'switch';
use Mojolicious::Lite -signatures; use Mojolicious::Lite -signatures;
use Mojo::SQLite; use Mojo::SQLite;
@ -166,11 +164,10 @@ get '/' => sub ($c) {
to_md($results); to_md($results);
given ($format) { if ( $format eq "json" ) {
when ("json") {
$c->render( json => $results ); $c->render( json => $results );
} }
default { else {
$c->render( $c->render(
template => 'results', template => 'results',
search => $search, search => $search,
@ -179,7 +176,6 @@ get '/' => sub ($c) {
); );
} }
} }
}
else { else {
$c->render( template => 'index' ); $c->render( template => 'index' );
} }