2022-03-14 19:13:10 +01:00
|
|
|
<?php
|
|
|
|
|
2024-04-07 22:17:30 +02:00
|
|
|
use CodeIgniter\Router\RouteCollection;
|
2022-03-14 19:13:10 +01:00
|
|
|
|
2024-04-07 22:17:30 +02:00
|
|
|
/**
|
|
|
|
* @var RouteCollection $routes
|
2022-03-14 19:13:10 +01:00
|
|
|
*/
|
|
|
|
$routes->get('/', 'Home::index');
|
2024-04-07 22:41:34 +02:00
|
|
|
$routes->set404Override('App\Controllers\Home::error404');
|
2024-04-07 22:17:30 +02:00
|
|
|
$routes->get('user/(:any)', 'Users::user/$1');
|
|
|
|
$routes->get('car/(:any)', 'Cars::index/$1');
|
|
|
|
$routes->get('track/(:any)', 'Tracks::index/$1');
|
|
|
|
$routes->get('race/(:num)', 'Races::index/$1');
|
2024-07-25 14:48:27 +02:00
|
|
|
$routes->get('users', 'Users::index');
|
|
|
|
$routes->get('login', 'Users::login');
|
2024-07-25 15:04:42 +02:00
|
|
|
$routes->get('register', 'Register::index');
|
2024-07-25 14:48:27 +02:00
|
|
|
$routes->post('webserver', 'Webserver::index');
|
|
|
|
|
|
|
|
$routes->group('dashboard', static function ($routes) {
|
|
|
|
$routes->get('/', 'Dashboard::index', ['filter' => 'userSession']);
|
|
|
|
$routes->get('user', 'Dashboard::user', ['filter' => 'userSession']);
|
|
|
|
$routes->get('logout', 'Dashboard::logout');
|
|
|
|
$routes->post('login', 'Dashboard::login');
|
|
|
|
$routes->post('update_user', 'Dashboard::updateUser', ['filter' => 'userSession']);
|
|
|
|
$routes->post('change_passwd', 'Dashboard::changePasswd', ['filter' => 'userSession']);
|
|
|
|
});
|