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,18 +164,16 @@ 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 ); }
} else {
default { $c->render(
$c->render( template => 'results',
template => 'results', search => $search,
search => $search, elapsed => $elapsed,
elapsed => $elapsed, results => $results
results => $results );
);
}
} }
} }
else { else {