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');
|
|
|
|
|
|
|
|
/*
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| 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')
|
2018-06-03 02:08:53 +00:00
|
|
|
->middleware(['throttle:20,1'])
|
2018-03-17 19:01:53 +00:00
|
|
|
->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-02-25 21:30:56 +00:00
|
|
|
});
|