misc_pterodactyl-panel/routes/admin.php

171 lines
6.9 KiB
PHP
Raw Normal View History

2017-04-02 01:01:10 +00:00
<?php
use Illuminate\Support\Facades\Route;
Route::get('/', 'BaseController@index')->name('admin.index')->fallback();
Route::get('/{react}', 'BaseController@index')
->where('react', '.+');
2017-04-02 01:01:10 +00:00
2018-01-19 03:36:15 +00:00
/*
|--------------------------------------------------------------------------
| Location Controller Routes
|--------------------------------------------------------------------------
|
| Endpoint: /admin/api
|
*/
Route::group(['prefix' => 'api'], function () {
Route::post('/new', 'ApiController@store');
2018-01-19 03:36:15 +00:00
Route::delete('/revoke/{identifier}', 'ApiController@delete')->name('admin.api.delete');
2018-01-19 03:36:15 +00:00
});
2017-04-02 01:01:10 +00:00
/*
|--------------------------------------------------------------------------
| Location Controller Routes
|--------------------------------------------------------------------------
|
| Endpoint: /admin/locations
|
*/
Route::group(['prefix' => 'locations'], function () {
Route::post('/', 'LocationController@create');
Route::patch('/view/{location}', 'LocationController@update');
2017-04-02 01:01:10 +00:00
});
/*
|--------------------------------------------------------------------------
| Database Controller Routes
|--------------------------------------------------------------------------
|
| Endpoint: /admin/databases
|
*/
Route::group(['prefix' => 'databases'], function () {
Route::post('/', 'DatabaseController@create');
Route::patch('/view/{host}', 'DatabaseController@update');
Route::delete('/view/{host}', 'DatabaseController@delete');
2017-04-02 01:01:10 +00:00
});
/*
|--------------------------------------------------------------------------
| Settings Controller Routes
|--------------------------------------------------------------------------
|
| Endpoint: /admin/settings
|
*/
Route::group(['prefix' => 'settings'], function () {
Route::patch('/', 'Settings\IndexController@update');
Route::patch('/mail', 'Settings\MailController@update');
Route::patch('/advanced', 'Settings\AdvancedController@update');
2017-04-02 01:01:10 +00:00
});
/*
|--------------------------------------------------------------------------
| User Controller Routes
|--------------------------------------------------------------------------
|
| Endpoint: /admin/users
|
*/
Route::group(['prefix' => 'users'], function () {
2017-04-09 23:13:22 +00:00
Route::post('/new', 'UserController@store');
Route::patch('/view/{user}', 'UserController@update');
2017-04-02 01:01:10 +00:00
Route::delete('/view/{user}', 'UserController@delete');
2017-04-02 01:01:10 +00:00
});
/*
|--------------------------------------------------------------------------
| Server Controller Routes
|--------------------------------------------------------------------------
|
| Endpoint: /admin/servers
|
*/
Route::group(['prefix' => 'servers'], function () {
Route::post('/new', 'Servers\CreateServerController@store');
Route::post('/view/{server}/build', 'ServersController@updateBuild');
Route::post('/view/{server}/startup', 'ServersController@saveStartup');
Route::post('/view/{server}/database', 'ServersController@newDatabase');
Route::post('/view/{server}/mounts/{mount}', 'ServersController@addMount')->name('admin.servers.view.mounts.toggle');
Route::post('/view/{server}/manage/toggle', 'ServersController@toggleInstall')->name('admin.servers.view.manage.toggle');
Route::post('/view/{server}/manage/suspension', 'ServersController@manageSuspension')->name('admin.servers.view.manage.suspension');
Route::post('/view/{server}/manage/reinstall', 'ServersController@reinstallServer')->name('admin.servers.view.manage.reinstall');
Route::post('/view/{server}/manage/transfer', 'Servers\ServerTransferController@transfer')->name('admin.servers.view.manage.transfer');
Route::post('/view/{server}/delete', 'ServersController@delete');
2017-04-02 01:01:10 +00:00
Route::patch('/view/{server}/details', 'ServersController@setDetails');
Route::patch('/view/{server}/database', 'ServersController@resetDatabasePassword');
2017-04-02 01:01:10 +00:00
Route::delete('/view/{server}/database/{database}/delete', 'ServersController@deleteDatabase')->name('admin.servers.view.database.delete');
Route::delete('/view/{server}/mounts/{mount}', 'ServersController@deleteMount');
2017-04-02 01:01:10 +00:00
});
/*
|--------------------------------------------------------------------------
| Node Controller Routes
|--------------------------------------------------------------------------
|
| Endpoint: /admin/nodes
|
*/
Route::group(['prefix' => 'nodes'], function () {
2017-04-09 23:13:22 +00:00
Route::post('/new', 'NodesController@store');
Route::post('/view/{node}/allocation', 'NodesController@createAllocation');
Route::post('/view/{node}/allocation/remove', 'NodesController@allocationRemoveBlock')->name('admin.nodes.view.allocation.removeBlock');
Route::post('/view/{node}/allocation/alias', 'NodesController@allocationSetAlias')->name('admin.nodes.view.allocation.setAlias');
2017-04-02 01:01:10 +00:00
Route::patch('/view/{node}/settings', 'NodesController@updateSettings');
Route::delete('/view/{node}/delete', 'NodesController@delete')->name('admin.nodes.view.delete');
Route::delete('/view/{node}/allocation/remove/{allocation}', 'NodesController@allocationRemoveSingle')->name('admin.nodes.view.allocation.removeSingle');
Route::delete('/view/{node}/allocations', 'NodesController@allocationRemoveMultiple')->name('admin.nodes.view.allocation.removeMultiple');
2017-04-02 01:01:10 +00:00
});
2020-05-20 23:29:03 +00:00
/*
|--------------------------------------------------------------------------
| Mount Controller Routes
|--------------------------------------------------------------------------
|
| Endpoint: /admin/mounts
|
*/
Route::group(['prefix' => 'mounts'], function () {
2020-05-21 00:55:59 +00:00
Route::post('/', 'MountController@create');
Route::post('/{mount}/eggs', 'MountController@addEggs')->name('admin.mounts.eggs');
Route::post('/{mount}/nodes', 'MountController@addNodes')->name('admin.mounts.nodes');
Route::patch('/view/{mount}', 'MountController@update');
Route::delete('/{mount}/eggs/{egg_id}', 'MountController@deleteEgg');
Route::delete('/{mount}/nodes/{node_id}', 'MountController@deleteNode');
2020-05-20 23:29:03 +00:00
});
2017-04-02 01:01:10 +00:00
/*
|--------------------------------------------------------------------------
| Nest Controller Routes
2017-04-02 01:01:10 +00:00
|--------------------------------------------------------------------------
|
| Endpoint: /admin/nests
2017-04-02 01:01:10 +00:00
|
*/
Route::group(['prefix' => 'nests'], function () {
Route::post('/new', 'Nests\NestController@store');
Route::post('/import', 'Nests\EggShareController@import')->name('admin.nests.egg.import');
Route::post('/egg/new', 'Nests\EggController@store');
Route::post('/egg/{egg}/variables', 'Nests\EggVariableController@store');
Route::put('/egg/{egg}', 'Nests\EggShareController@update');
Route::patch('/view/{nest}', 'Nests\NestController@update');
Route::patch('/egg/{egg}', 'Nests\EggController@update');
Route::patch('/egg/{egg}/scripts', 'Nests\EggScriptController@update');
Route::patch('/egg/{egg}/variables/{variable}', 'Nests\EggVariableController@update')->name('admin.nests.egg.variables.edit');
Route::delete('/view/{nest}', 'Nests\NestController@destroy');
Route::delete('/egg/{egg}', 'Nests\EggController@destroy');
Route::delete('/egg/{egg}/variables/{variable}', 'Nests\EggVariableController@destroy');
2017-04-02 01:01:10 +00:00
});