2015-12-06 18:58:49 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Pterodactyl\Http\Routes;
|
|
|
|
|
|
|
|
use Illuminate\Routing\Router;
|
|
|
|
|
|
|
|
class BaseRoutes {
|
|
|
|
|
|
|
|
public function map(Router $router) {
|
|
|
|
|
|
|
|
// Handle Index. Redirect /index to /
|
|
|
|
$router->get('/', [ 'as' => 'index', 'uses' => 'Base\IndexController@getIndex' ]);
|
|
|
|
$router->get('/index', function () {
|
|
|
|
return redirect()->route('index');
|
|
|
|
});
|
|
|
|
|
2015-12-12 06:21:17 +00:00
|
|
|
// Password Generation
|
|
|
|
$router->get('/password-gen/{length}', [ 'as' => 'password-gen', 'uses' => 'Base\IndexController@getPassword' ]);
|
|
|
|
|
2015-12-06 18:58:49 +00:00
|
|
|
// Account Routes
|
|
|
|
$router->get('/account', [ 'as' => 'account', 'uses' => 'Base\IndexController@getAccount' ]);
|
|
|
|
$router->post('/account/password', [ 'uses' => 'Base\IndexController@postAccountPassword' ]);
|
|
|
|
$router->post('/account/email', [ 'uses' => 'Base\IndexController@postAccountEmail' ]);
|
|
|
|
|
|
|
|
// TOTP Routes
|
|
|
|
$router->get('/account/totp', [ 'as' => 'account.totp', 'uses' => 'Base\IndexController@getAccountTotp' ]);
|
|
|
|
$router->put('/account/totp', [ 'uses' => 'Base\IndexController@putAccountTotp' ]);
|
|
|
|
$router->post('/account/totp', [ 'uses' => 'Base\IndexController@postAccountTotp' ]);
|
|
|
|
$router->delete('/account/totp', [ 'uses' => 'Base\IndexController@deleteAccountTotp' ]);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|