Updated routes to use POST for restore

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2021-10-04 17:17:36 -07:00
parent fa1cf3073b
commit caad5be957
4 changed files with 4 additions and 4 deletions

View file

@ -39,7 +39,7 @@ Route::group(['middleware' => 'auth'], function () {
Route::group([ 'prefix' => 'manufacturers', 'middleware' => ['auth'] ], function () { Route::group([ 'prefix' => 'manufacturers', 'middleware' => ['auth'] ], function () {
Route::get('{manufacturers_id}/restore', [ 'as' => 'restore/manufacturer', 'uses' => 'ManufacturersController@restore']); Route::post('{manufacturers_id}/restore', [ 'as' => 'restore/manufacturer', 'uses' => 'ManufacturersController@restore']);
}); });
Route::resource('manufacturers', 'ManufacturersController', [ Route::resource('manufacturers', 'ManufacturersController', [

View file

@ -131,7 +131,7 @@ Route::group(
]); ]);
Route::get('{assetId}/qr_code', [ 'as' => 'qr_code/hardware', 'uses' => 'Assets\AssetsController@getQrCode' ]); Route::get('{assetId}/qr_code', [ 'as' => 'qr_code/hardware', 'uses' => 'Assets\AssetsController@getQrCode' ]);
Route::get('{assetId}/barcode', [ 'as' => 'barcode/hardware', 'uses' => 'Assets\AssetsController@getBarCode' ]); Route::get('{assetId}/barcode', [ 'as' => 'barcode/hardware', 'uses' => 'Assets\AssetsController@getBarCode' ]);
Route::get('{assetId}/restore', [ Route::post('{assetId}/restore', [
'as' => 'restore/hardware', 'as' => 'restore/hardware',
'uses' => 'Assets\AssetsController@getRestore' 'uses' => 'Assets\AssetsController@getRestore'
]); ]);

View file

@ -6,7 +6,7 @@ Route::group([ 'prefix' => 'models', 'middleware' => ['auth'] ], function () {
Route::get('{modelId}/clone', [ 'as' => 'clone/model', 'uses' => 'AssetModelsController@getClone' ]); Route::get('{modelId}/clone', [ 'as' => 'clone/model', 'uses' => 'AssetModelsController@getClone' ]);
Route::post('{modelId}/clone', 'AssetModelsController@postCreate'); Route::post('{modelId}/clone', 'AssetModelsController@postCreate');
Route::get('{modelId}/view', [ 'as' => 'view/model', 'uses' => 'AssetModelsController@getView' ]); Route::get('{modelId}/view', [ 'as' => 'view/model', 'uses' => 'AssetModelsController@getView' ]);
Route::get('{modelID}/restore', [ 'as' => 'restore/model', 'uses' => 'AssetModelsController@getRestore', 'middleware' => ['authorize:superuser'] ]); Route::post('{modelID}/restore', [ 'as' => 'restore/model', 'uses' => 'AssetModelsController@getRestore', 'middleware' => ['authorize:superuser'] ]);
Route::get('{modelId}/custom_fields', ['as' => 'custom_fields/model','uses' => 'AssetModelsController@getCustomFields']); Route::get('{modelId}/custom_fields', ['as' => 'custom_fields/model','uses' => 'AssetModelsController@getCustomFields']);
Route::post('bulkedit', ['as' => 'models.bulkedit.index','uses' => 'BulkAssetModelsController@edit']); Route::post('bulkedit', ['as' => 'models.bulkedit.index','uses' => 'BulkAssetModelsController@edit']);
Route::post('bulksave', ['as' => 'models.bulkedit.store','uses' => 'BulkAssetModelsController@update']); Route::post('bulksave', ['as' => 'models.bulkedit.store','uses' => 'BulkAssetModelsController@update']);

View file

@ -8,7 +8,7 @@ Route::group([ 'prefix' => 'users', 'middleware' => ['auth']], function () {
Route::get('export', [ 'as' => 'users.export', 'uses' => 'Users\UsersController@getExportUserCsv' ]); Route::get('export', [ 'as' => 'users.export', 'uses' => 'Users\UsersController@getExportUserCsv' ]);
Route::get('{userId}/clone', [ 'as' => 'clone/user', 'uses' => 'Users\UsersController@getClone' ]); Route::get('{userId}/clone', [ 'as' => 'clone/user', 'uses' => 'Users\UsersController@getClone' ]);
Route::post('{userId}/clone', [ 'uses' => 'Users\UsersController@postCreate' ]); Route::post('{userId}/clone', [ 'uses' => 'Users\UsersController@postCreate' ]);
Route::get('{userId}/restore', [ 'as' => 'restore/user', 'uses' => 'Users\UsersController@getRestore' ]); Route::post('{userId}/restore', [ 'as' => 'restore/user', 'uses' => 'Users\UsersController@getRestore' ]);
Route::get('{userId}/unsuspend', [ 'as' => 'unsuspend/user', 'uses' => 'Users\UsersController@getUnsuspend' ]); Route::get('{userId}/unsuspend', [ 'as' => 'unsuspend/user', 'uses' => 'Users\UsersController@getUnsuspend' ]);
Route::post('{userId}/upload', [ 'as' => 'upload/user', 'uses' => 'Users\UserFilesController@store' ]); Route::post('{userId}/upload', [ 'as' => 'upload/user', 'uses' => 'Users\UserFilesController@store' ]);
Route::delete( Route::delete(