2018-02-25 21:30:56 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use Pterodactyl\Http\Middleware\Api\Client\AuthenticateClientAccess;
|
|
|
|
|
|
|
|
/*
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| Client Control API
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
| Endpoint: /api/client
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
Route::get('/', 'ClientController@index')->name('api.client.index');
|
|
|
|
|
2018-06-06 06:00:01 +00:00
|
|
|
Route::group(['prefix' => '/account'], function () {
|
|
|
|
Route::get('/', 'AccountController@index')->name('api.client.account');
|
2018-06-12 05:56:57 +00:00
|
|
|
|
2018-06-12 05:36:43 +00:00
|
|
|
Route::put('/email', 'AccountController@updateEmail')->name('api.client.account.update-email');
|
2018-06-17 23:53:24 +00:00
|
|
|
Route::put('/password', 'AccountController@updatePassword')->name('api.client.account.update-password');
|
2018-06-06 06:00:01 +00:00
|
|
|
});
|
|
|
|
|
2018-02-25 21:30:56 +00:00
|
|
|
/*
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| Client Control API
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
| Endpoint: /api/client/servers/{server}
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
Route::group(['prefix' => '/servers/{server}', 'middleware' => [AuthenticateClientAccess::class]], function () {
|
2018-02-28 03:28:43 +00:00
|
|
|
Route::get('/', 'Servers\ServerController@index')->name('api.client.servers.view');
|
2018-03-17 19:01:53 +00:00
|
|
|
Route::get('/utilization', 'Servers\ResourceUtilizationController@index')
|
|
|
|
->name('api.client.servers.resources');
|
2018-02-25 21:30:56 +00:00
|
|
|
|
2018-02-28 03:28:43 +00:00
|
|
|
Route::post('/command', 'Servers\CommandController@index')->name('api.client.servers.command');
|
|
|
|
Route::post('/power', 'Servers\PowerController@index')->name('api.client.servers.power');
|
2018-08-22 04:47:01 +00:00
|
|
|
|
|
|
|
Route::group(['prefix' => '/databases'], function () {
|
|
|
|
Route::get('/', 'Servers\DatabaseController@index')->name('api.client.servers.databases');
|
|
|
|
});
|
2018-02-25 21:30:56 +00:00
|
|
|
});
|