Skip to content

Commit

Permalink
Bug in route. In previous versione, every page calls produced a call …
Browse files Browse the repository at this point in the history
…to render_json also if page was not in json
  • Loading branch information
EmilianoBruni committed Jun 8, 2022
1 parent c1cbeed commit 7acdb6c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/Mojo/Leds/Page.pm
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ sub route {
$s->stash( 'format', $format );

$s->respond_to(
html => sub { shift->render_pm },
json => { json => $s->render_json },
css => sub { shift->render_static_file },
js => sub { shift->render_static_file },
html => sub { $s->render_pm },
json => sub { $s->render( json => $s->render_json ) },
css => sub { $s->render_static_file },
js => sub { $s->render_static_file },
any => { text => '', status => 204 }
);

Expand Down

0 comments on commit 7acdb6c

Please sign in to comment.