1
0
mirror of https://gitlab.com/depesz/explain.depesz.com.git synced 2025-07-03 00:58:12 +02:00

Update routing for Mojolicious v9

This commit is contained in:
Raphaël Rondeau
2021-03-05 14:03:24 +01:00
parent 383e5e538c
commit eec934a94d

View File

@ -47,50 +47,50 @@ sub startup {
my $routes = $self->routes; my $routes = $self->routes;
# route: 'index' # route: 'index'
$routes->route( '/' )->to( 'controller#index' )->name( 'new-explain' ); $routes->any( '/' )->to( 'controller#index' )->name( 'new-explain' );
# route: 'status' # route: 'status'
$routes->route( '/status' )->to( 'controller#status' )->name( 'status' ); $routes->any( '/status' )->to( 'controller#status' )->name( 'status' );
# route: 'new-optimization' # route: 'new-optimization'
$routes->route( '/new_optimization' )->to( 'controller#new_optimization' )->name( 'new-optimization' ); $routes->any( '/new_optimization' )->to( 'controller#new_optimization' )->name( 'new-optimization' );
# route: 'user-history' # route: 'user-history'
$routes->route( '/user-history/:direction/:key' )->to( 'controller#user_history', direction => undef, key => undef )->name( 'user-history' ); $routes->any( '/user-history/:direction/:key' )->to( 'controller#user_history', direction => undef, key => undef )->name( 'user-history' );
# route: 'plan-change' # route: 'plan-change'
$routes->route( '/plan-change/:id' )->to( 'controller#plan_change' )->name( 'plan-change' ); $routes->any( '/plan-change/:id' )->to( 'controller#plan_change' )->name( 'plan-change' );
# route: 'login' # route: 'login'
$routes->route( '/login' )->to( 'controller#login' )->name( 'login' ); $routes->any( '/login' )->to( 'controller#login' )->name( 'login' );
# route: 'logout' # route: 'logout'
$routes->route( '/logout' )->to( 'controller#logout' )->name( 'logout' ); $routes->any( '/logout' )->to( 'controller#logout' )->name( 'logout' );
# route: 'user' # route: 'user'
$routes->route( '/user' )->to( 'controller#user' )->name( 'user' ); $routes->any( '/user' )->to( 'controller#user' )->name( 'user' );
# route: 'show' # route: 'show'
$routes->route( '/s/:id' )->to( 'controller#show', id => '' )->name( 'show' ); $routes->any( '/s/:id' )->to( 'controller#show', id => '' )->name( 'show' );
# route: 'iframe' # route: 'iframe'
$routes->route( '/i/:id' )->to( 'controller#show', id => '' )->name( 'iframe' ); $routes->any( '/i/:id' )->to( 'controller#show', id => '' )->name( 'iframe' );
# route: 'delete' # route: 'delete'
$routes->route( '/d/:id/:key' )->to( 'controller#delete', id => '', key => '' )->name( 'delete' ); $routes->any( '/d/:id/:key' )->to( 'controller#delete', id => '', key => '' )->name( 'delete' );
# route: 'history' # route: 'history'
$routes->route( '/history/:date' )->to( 'controller#history', date => '' )->name( 'history' ); $routes->any( '/history/:date' )->to( 'controller#history', date => '' )->name( 'history' );
# route: 'contact' # route: 'contact'
$routes->get( '/contact' )->to( 'controller#contact' )->name( 'contact' ); $routes->get( '/contact' )->to( 'controller#contact' )->name( 'contact' );
$routes->post( '/contact' )->to( 'controller#contact_post' )->name( 'contact_post' ); $routes->post( '/contact' )->to( 'controller#contact_post' )->name( 'contact_post' );
# route: 'help' # route: 'help'
$routes->route( '/help' )->to( 'controller#help' )->name( 'help' ); $routes->any( '/help' )->to( 'controller#help' )->name( 'help' );
# route: 'info' # route: 'info'
$routes->route( '/info' )->to( 'controller#info' )->name( 'info' ); $routes->any( '/info' )->to( 'controller#info' )->name( 'info' );
return; return;
} }