You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
563 B
PHP
23 lines
563 B
PHP
<?php
|
|
|
|
use Engelsystem\Http\Exceptions\HttpTemporaryRedirect;
|
|
use FastRoute\RouteCollector;
|
|
|
|
/** @var RouteCollector $route */
|
|
|
|
// Pages
|
|
$route->get('/', function () {
|
|
throw new HttpTemporaryRedirect(auth()->user() ? config('home_site') : 'login');
|
|
});
|
|
$route->get('/credits', 'CreditsController@index');
|
|
|
|
// Authentication
|
|
$route->get('/logout', 'AuthController@logout');
|
|
|
|
// Stats
|
|
$route->get('/metrics', 'Metrics\\Controller@metrics');
|
|
$route->get('/stats', 'Metrics\\Controller@stats');
|
|
|
|
// API
|
|
$route->get('/api[/{resource:.+}]', 'ApiController@index');
|