Implement initial server and location API routes.

Also fixes a few exception handler issues causing incorrect HTTP status
codes on authorization errors.
This commit is contained in:
Dane Everitt 2017-04-09 13:15:15 -04:00
parent 463f465dea
commit c492446513
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
12 changed files with 639 additions and 45 deletions

View file

@ -22,7 +22,7 @@
* SOFTWARE.
*/
Route::get('/', 'CoreController@index')->name('api.admin');
Route::get('/', 'CoreController@index');
/*
@ -34,6 +34,31 @@ Route::get('/', 'CoreController@index')->name('api.admin');
|
*/
Route::group(['prefix' => '/servers'], function () {
Route::get('/', 'ServerController@index')->name('api.admin.servers.list');
Route::get('/{id}', 'ServerController@view')->name('api.admin.servers.view');
Route::get('/', 'ServerController@index');
Route::get('/{id}', 'ServerController@view');
Route::post('/', 'ServerController@store');
Route::put('/{id}/details', 'ServerController@details');
Route::put('/{id}/container', 'ServerController@container');
Route::put('/{id}/build', 'ServerController@build');
Route::put('/{id}/startup', 'ServerController@startup');
Route::patch('/{id}/install', 'ServerController@install');
Route::patch('/{id}/rebuild', 'ServerController@rebuild');
Route::patch('/{id}/suspend', 'ServerController@suspend');
Route::delete('/{id}', 'ServerController@delete');
});
/*
|--------------------------------------------------------------------------
| Location Controller Routes
|--------------------------------------------------------------------------
|
| Endpoint: /api/admin/locations
|
*/
Route::group(['prefix' => '/locations'], function () {
Route::get('/', 'LocationController@index');
});