Skip to content

Commit c4c7592

Browse files
committed
Remove some setup of routes that are done twice.
The removed code is all done again in the `supplementalRoutes` method, and so is not needed.
1 parent fd307ca commit c4c7592

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

lib/RenderApp.pm

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -133,21 +133,6 @@ sub startup {
133133
$r->any('/render-api')->to('render#problem');
134134
$r->any('/render-ptx')->to('render#render_ptx');
135135
$r->any('/health' => sub { shift->rendered(200) });
136-
$r->any('/health' => sub {shift->rendered(200)});
137-
if ($self->mode eq 'development' || $self->config('FULL_APP_INSECURE')) {
138-
$r->any('')->to('pages#twocolumn');
139-
$r->any('/')->to('pages#twocolumn');
140-
$r->any('/opl')->to('pages#oplUI');
141-
$r->any('/die' => sub {die "what did you expect, flowers?"});
142-
$r->any('/timeout' => sub {
143-
my $c = shift;
144-
my $tx = $c->render_later->tx;
145-
Mojo::IOLoop->timer(2 => sub {
146-
$tx = $tx; # prevent $tx from going out of scope
147-
$c->rendered(200);
148-
});
149-
});
150-
}
151136

152137
# Enable problem editor & OPL browser -- NOT recommended for production environment!
153138
supplementalRoutes($r) if ($self->mode eq 'development' || $self->config('FULL_APP_INSECURE'));
@@ -157,7 +142,6 @@ sub startup {
157142
$r->any('/pg_files/tmp/*static')->to('StaticFiles#temp_file');
158143
$r->any('/pg_files/*static')->to('StaticFiles#pg_file');
159144
$r->any('/*static')->to('StaticFiles#public_file');
160-
161145
}
162146

163147
sub supplementalRoutes {

0 commit comments

Comments
 (0)