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 File::Basename;
use feature 'switch';
use Mojolicious::Lite -signatures;
use Mojo::SQLite;
@ -166,18 +164,16 @@ get '/' => sub ($c) {
to_md($results);
given ($format) {
when ("json") {
$c->render( json => $results );
}
default {
$c->render(
template => 'results',
search => $search,
elapsed => $elapsed,
results => $results
);
}
if ( $format eq "json" ) {
$c->render( json => $results );
}
else {
$c->render(
template => 'results',
search => $search,
elapsed => $elapsed,
results => $results
);
}
}
else {