2018-08-25 21:16:20 +02:00
|
|
|
<?php
|
|
|
|
|
2018-11-21 12:17:28 +01:00
|
|
|
use Engelsystem\Http\Exceptions\HttpTemporaryRedirect;
|
2018-08-25 21:16:20 +02:00
|
|
|
use FastRoute\RouteCollector;
|
|
|
|
|
|
|
|
/** @var RouteCollector $route */
|
|
|
|
|
2018-12-18 02:23:44 +01:00
|
|
|
// Pages
|
2018-11-21 12:17:28 +01:00
|
|
|
$route->get('/', function () {
|
|
|
|
throw new HttpTemporaryRedirect(auth()->user() ? config('home_site') : 'login');
|
|
|
|
});
|
2018-09-02 02:13:18 +02:00
|
|
|
$route->get('/credits', 'CreditsController@index');
|
2018-12-18 02:23:44 +01:00
|
|
|
|
2018-10-25 18:53:05 +02:00
|
|
|
// Authentication
|
|
|
|
$route->get('/logout', 'AuthController@logout');
|
|
|
|
|
2018-12-18 02:23:44 +01:00
|
|
|
// Stats
|
|
|
|
$route->get('/metrics', 'Metrics\\Controller@metrics');
|
|
|
|
$route->get('/stats', 'Metrics\\Controller@stats');
|
2018-11-20 18:55:56 +01:00
|
|
|
|
|
|
|
// API
|
|
|
|
$route->get('/api[/{resource:.+}]', 'ApiController@index');
|