Move everything around as needed to get things setup for the client API

This commit is contained in:
Dane Everitt 2018-02-25 15:30:56 -06:00
parent 8daf97021a
commit e28973bcae
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
17 changed files with 199 additions and 46 deletions

28
routes/api-client.php Normal file
View file

@ -0,0 +1,28 @@
<?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 () {
Route::get('/', 'Server\ServerController@index')->name('api.client.servers.view');
Route::post('/command', 'Server\CommandController@index')->name('api.client.servers.command');
Route::post('/power', 'Server\PowerController@index')->name('api.client.servers.power');
});

View file

@ -1,27 +0,0 @@
<?php
/*
* Pterodactyl - Panel
* Copyright (c) 2015 - 2017 Dane Everitt <dane@daneeveritt.com>.
*
* This software is licensed under the terms of the MIT license.
* https://opensource.org/licenses/MIT
*/
//Route::get('/', 'CoreController@index')->name('api.user');
//
///*
//|--------------------------------------------------------------------------
//| Server Controller Routes
//|--------------------------------------------------------------------------
//|
//| Endpoint: /api/user/server/{server}
//|
//*/
//Route::group([
// 'prefix' => '/server/{server}',
// 'middleware' => 'server',
//], function () {
// Route::get('/', 'ServerController@index')->name('api.user.server');
//
// Route::post('/power', 'ServerController@power')->name('api.user.server.power');
// Route::post('/command', 'ServerController@command')->name('api.user.server.command');
//});