2015-12-06 18:58:49 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Pterodactyl\Http\Routes;
|
|
|
|
|
|
|
|
use Illuminate\Routing\Router;
|
|
|
|
|
|
|
|
class AdminRoutes {
|
|
|
|
|
|
|
|
public function map(Router $router) {
|
|
|
|
$router->group(['prefix' => 'admin'], function ($server) use ($router) {
|
|
|
|
$router->get('/', [ 'as' => 'admin.index', 'uses' => 'Admin\BaseController@getIndex' ]);
|
|
|
|
|
|
|
|
// Account Routes
|
|
|
|
$router->group(['prefix' => 'accounts'], function ($server) use ($router) {
|
2015-12-12 06:21:17 +00:00
|
|
|
|
|
|
|
$router->get('/new', [ 'as' => 'admin.accounts.new', 'uses' => 'Admin\AccountsController@getNew' ]);
|
|
|
|
$router->post('/new', [ 'as' => 'admin.accounts.new', 'uses' => 'Admin\AccountsController@postNew' ]);
|
2016-01-02 05:25:41 +00:00
|
|
|
|
|
|
|
$router->get('/', [ 'as' => 'admin.accounts', 'uses' => 'Admin\AccountsController@getIndex' ]);
|
|
|
|
$router->get('/view/{id}', [ 'as' => 'admin.accounts.view', 'uses' => 'Admin\AccountsController@getView' ]);
|
|
|
|
|
|
|
|
$router->post('/update', [ 'as' => 'admin.accounts.update', 'uses' => 'Admin\AccountsController@postUpdate' ]);
|
|
|
|
$router->get('/delete/{id}', [ 'as' => 'admin.accounts.delete', 'uses' => 'Admin\AccountsController@getDelete' ]);
|
2015-12-06 18:58:49 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
// Server Routes
|
|
|
|
$router->group(['prefix' => 'servers'], function ($server) use ($router) {
|
2015-12-10 23:30:47 +00:00
|
|
|
|
2015-12-06 18:58:49 +00:00
|
|
|
$router->get('/', [ 'as' => 'admin.servers', 'uses' => 'Admin\ServersController@getIndex' ]);
|
|
|
|
$router->get('/new', [ 'as' => 'admin.servers.new', 'uses' => 'Admin\ServersController@getNew' ]);
|
|
|
|
$router->get('/view/{id}', [ 'as' => 'admin.servers.view', 'uses' => 'Admin\ServersController@getView' ]);
|
|
|
|
|
2016-01-02 23:04:18 +00:00
|
|
|
$router->post('/view/{id}/details', [ 'uses' => 'Admin\ServersController@postUpdateServerDetails' ]);
|
2016-01-03 04:21:22 +00:00
|
|
|
$router->post('/view/{id}/rebuild', [ 'uses' => 'Admin\ServersController@postUpdateServerToggleBuild' ]);
|
|
|
|
$router->post('/view/{id}/build', [ 'uses' => 'Admin\ServersController@postUpdateServerUpdateBuild' ]);
|
2016-01-04 04:16:03 +00:00
|
|
|
$router->delete('/view/{id}/{force?}', [ 'uses' => 'Admin\ServersController@deleteServer' ]);
|
2016-01-02 23:04:18 +00:00
|
|
|
|
2015-12-10 23:30:47 +00:00
|
|
|
$router->post('/new', [ 'uses' => 'Admin\ServersController@postNewServer']);
|
|
|
|
$router->post('/new/get-nodes', [ 'uses' => 'Admin\ServersController@postNewServerGetNodes' ]);
|
|
|
|
$router->post('/new/get-ips', [ 'uses' => 'Admin\ServersController@postNewServerGetIps' ]);
|
|
|
|
$router->post('/new/service-options', [ 'uses' => 'Admin\ServersController@postNewServerServiceOptions' ]);
|
|
|
|
$router->post('/new/service-variables', [ 'uses' => 'Admin\ServersController@postNewServerServiceVariables' ]);
|
|
|
|
|
2015-12-07 05:47:19 +00:00
|
|
|
});
|
|
|
|
|
2015-12-06 18:58:49 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|