mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-09 23:24:06 -08:00
Some fixes to some typos in other routes, commeting out parameters parameter which seems crashy
This commit is contained in:
parent
9456a03a88
commit
17aab61987
|
@ -980,14 +980,14 @@ Route::group(['prefix' => 'v1', 'middleware' => 'api'], function () {
|
|||
]
|
||||
)->name('api.kits.models.store');
|
||||
|
||||
Route::put('models/{model_id',
|
||||
Route::put('models/{model_id}',
|
||||
[
|
||||
Api\PredefinedKitsController::class,
|
||||
'updateModels'
|
||||
]
|
||||
)->name('api.kits.models.update');
|
||||
|
||||
Route::delete('models/{model_id',
|
||||
Route::delete('models/{model_id}',
|
||||
[
|
||||
Api\PredefinedKitsController::class,
|
||||
'detachModels'
|
||||
|
|
|
@ -51,130 +51,97 @@ Route::group(
|
|||
[Assets\AssetsController::class, 'dueForAudit']
|
||||
)->name('assets.audit.due');
|
||||
|
||||
Route::get('audit/overdue', [
|
||||
'as' => 'assets.audit.overdue',
|
||||
'uses' => [Assets\AssetsController::class, 'overdueForAudit'],
|
||||
]);
|
||||
Route::get('audit/overdue',
|
||||
[Assets\AssetsController::class, 'overdueForAudit']
|
||||
)->name('assets.audit.overdue');
|
||||
|
||||
Route::get('audit/{id}', [
|
||||
'as' => 'asset.audit.create',
|
||||
'uses' => [Assets\AssetsController::class, 'audit'],
|
||||
]);
|
||||
Route::get('audit/{id}',
|
||||
[Assets\AssetsController::class, 'audit']
|
||||
)->name('asset.audit.create');
|
||||
|
||||
Route::post('audit/{id}', [
|
||||
'as' => 'asset.audit.store',
|
||||
'uses' => [Assets\AssetsController::class, 'auditStore'],
|
||||
]);
|
||||
Route::post('audit/{id}',
|
||||
[Assets\AssetsController::class, 'auditStore']
|
||||
)->name('asset.audit.store');
|
||||
|
||||
Route::get('history', [
|
||||
'as' => 'asset.import-history',
|
||||
'uses' => [Assets\AssetsController::class, 'getImportHistory'],
|
||||
]);
|
||||
Route::get('history',
|
||||
[Assets\AssetsController::class, 'getImportHistory']
|
||||
)->name('asset.import-history');
|
||||
|
||||
Route::post('history', [
|
||||
'as' => 'asset.process-import-history',
|
||||
'uses' => [Assets\AssetsController::class, 'postImportHistory'],
|
||||
]);
|
||||
Route::post('history',
|
||||
[Assets\AssetsController::class, 'postImportHistory']
|
||||
)->name('asset.process-import-history');
|
||||
|
||||
Route::get('bytag/{any?}',
|
||||
[
|
||||
'as' => 'findbytag/hardware',
|
||||
'uses' => [Assets\AssetsController::class, 'getAssetByTag'],
|
||||
]
|
||||
)->where('any', '.*');
|
||||
[Assets\AssetsController::class, 'getAssetByTag']
|
||||
)->where('any', '.*')->name('findbytag/hardware');
|
||||
|
||||
Route::get('byserial/{any?}',
|
||||
[
|
||||
'as' => 'findbyserial/hardware',
|
||||
'uses' => [Assets\AssetsController::class, 'getAssetBySerial'],
|
||||
]
|
||||
)->where('any', '.*');
|
||||
[Assets\AssetsController::class, 'getAssetBySerial']
|
||||
)->where('any', '.*')->name('findbyserial/hardware');
|
||||
|
||||
Route::get('{assetId}/clone', [
|
||||
'as' => 'clone/hardware',
|
||||
'uses' => [Assets\AssetsController::class, 'getClone'],
|
||||
]);
|
||||
Route::get('{assetId}/clone',
|
||||
[Assets\AssetsController::class, 'getClone']
|
||||
)->name('clone/hardware');
|
||||
|
||||
Route::get('{assetId}/label', [
|
||||
'as' => 'label/hardware',
|
||||
'uses' => [Assets\AssetsController::class, 'getLabel'],
|
||||
]);
|
||||
Route::get('{assetId}/label',
|
||||
[Assets\AssetsController::class, 'getLabel']
|
||||
)->name('label/hardware');
|
||||
|
||||
Route::post('{assetId}/clone', [Assets\AssetsController::class, 'postCreate']);
|
||||
|
||||
Route::get('{assetId}/checkout', [
|
||||
'as' => 'checkout/hardware',
|
||||
'uses' => [Assets\AssetCheckoutController::class, 'create'],
|
||||
]);
|
||||
Route::post('{assetId}/checkout', [
|
||||
'as' => 'checkout/hardware',
|
||||
'uses' => [Assets\AssetCheckoutController::class, 'store'],
|
||||
]);
|
||||
Route::get('{assetId}/checkin/{backto?}', [
|
||||
'as' => 'checkin/hardware',
|
||||
'uses' => [Assets\AssetCheckinController::class, 'create'],
|
||||
]);
|
||||
Route::get('{assetId}/checkout',
|
||||
[Assets\AssetCheckoutController::class, 'create']
|
||||
)->name('checkout/hardware');
|
||||
Route::post('{assetId}/checkout',
|
||||
[Assets\AssetCheckoutController::class, 'store']
|
||||
)->name('checkout/hardware');
|
||||
Route::get('{assetId}/checkin/{backto?}',
|
||||
[Assets\AssetCheckinController::class, 'create']
|
||||
)->name('checkin/hardware');
|
||||
|
||||
Route::post('{assetId}/checkin/{backto?}', [
|
||||
'as' => 'checkin/hardware',
|
||||
'uses' => [Assets\AssetCheckinController::class, 'store'],
|
||||
]);
|
||||
Route::get('{assetId}/view', [
|
||||
'as' => 'hardware.view',
|
||||
'uses' => [Assets\AssetsController::class, 'show'],
|
||||
]);
|
||||
Route::get('{assetId}/qr_code', ['as' => 'qr_code/hardware', 'uses' => [Assets\AssetsController::class, 'getQrCode']]);
|
||||
Route::get('{assetId}/barcode', ['as' => 'barcode/hardware', 'uses' => [Assets\AssetsController::class, 'getBarCode']]);
|
||||
Route::get('{assetId}/restore', [
|
||||
'as' => 'restore/hardware',
|
||||
'uses' => [Assets\AssetsController::class, 'getRestore'],
|
||||
]);
|
||||
Route::post('{assetId}/upload', [
|
||||
'as' => 'upload/asset',
|
||||
'uses' => [Assets\AssetFilesController::class, 'store'],
|
||||
]);
|
||||
Route::post('{assetId}/checkin/{backto?}',
|
||||
[Assets\AssetCheckinController::class, 'store']
|
||||
)->name('checkin/hardware');
|
||||
Route::get('{assetId}/view',
|
||||
[Assets\AssetsController::class, 'show']
|
||||
)->name('hardware.view');
|
||||
Route::get('{assetId}/qr_code', [Assets\AssetsController::class, 'getQrCode'])->name('qr_code/hardware');
|
||||
Route::get('{assetId}/barcode', [Assets\AssetsController::class, 'getBarCode'])->name('barcode/hardware');
|
||||
Route::get('{assetId}/restore',
|
||||
[Assets\AssetsController::class, 'getRestore']
|
||||
)->name('restore/hardware');
|
||||
Route::post('{assetId}/upload',
|
||||
[Assets\AssetFilesController::class, 'store']
|
||||
)->name('upload/asset');
|
||||
|
||||
Route::get('{assetId}/showfile/{fileId}/{download?}', [
|
||||
'as' => 'show/assetfile',
|
||||
'uses' => [Assets\AssetFilesController::class, 'show'],
|
||||
]);
|
||||
Route::get('{assetId}/showfile/{fileId}/{download?}',
|
||||
[Assets\AssetFilesController::class, 'show']
|
||||
)->name('show/assetfile');
|
||||
|
||||
Route::delete('{assetId}/showfile/{fileId}/delete', [
|
||||
'as' => 'delete/assetfile',
|
||||
'uses' => [Assets\AssetFilesController::class, 'destroy'],
|
||||
]);
|
||||
Route::delete('{assetId}/showfile/{fileId}/delete',
|
||||
[Assets\AssetFilesController::class, 'destroy']
|
||||
)->name('delete/assetfile');
|
||||
|
||||
Route::post(
|
||||
'bulkedit',
|
||||
[
|
||||
'as' => 'hardware/bulkedit',
|
||||
'uses' => [Assets\BulkAssetsController::class, 'edit'],
|
||||
]
|
||||
);
|
||||
[Assets\BulkAssetsController::class, 'edit']
|
||||
)->name('hardware/bulkedit');
|
||||
Route::post(
|
||||
'bulkdelete',
|
||||
[
|
||||
'as' => 'hardware/bulkdelete',
|
||||
'uses' => [Assets\BulkAssetsController::class, 'destroy'],
|
||||
]
|
||||
);
|
||||
[Assets\BulkAssetsController::class, 'destroy']
|
||||
)->name('hardware/bulkdelete');
|
||||
Route::post(
|
||||
'bulksave',
|
||||
[
|
||||
'as' => 'hardware/bulksave',
|
||||
'uses' => [Assets\BulkAssetsController::class, 'update'],
|
||||
]
|
||||
);
|
||||
[Assets\BulkAssetsController::class, 'update']
|
||||
)->name('hardware/bulksave');
|
||||
|
||||
// Bulk checkout / checkin
|
||||
Route::get('bulkcheckout', [
|
||||
'as' => 'hardware/bulkcheckout',
|
||||
'uses' => [Assets\BulkAssetsController::class, 'showCheckout'],
|
||||
]);
|
||||
Route::post('bulkcheckout', [
|
||||
'as' => 'hardware/bulkcheckout',
|
||||
'uses' => [Assets\BulkAssetsController::class, 'storeCheckout'],
|
||||
]);
|
||||
Route::get('bulkcheckout',
|
||||
[Assets\BulkAssetsController::class, 'showCheckout']
|
||||
)->name('hardware/bulkcheckout');
|
||||
Route::post('bulkcheckout',
|
||||
[Assets\BulkAssetsController::class, 'storeCheckout']
|
||||
)->name('hardware/bulkcheckout');
|
||||
});
|
||||
|
||||
Route::resource('hardware', Assets\AssetsController::class, [
|
||||
|
|
|
@ -35,7 +35,7 @@ Route::group(['prefix' => 'kits/{kit_id}', 'middleware' => ['auth']], function (
|
|||
|
||||
Route::put('models/{model_id}',
|
||||
[Kits\PredefinedKitsController::class, 'updateModel']
|
||||
)->parameters([2 => 'kit_id', 1 => 'model_id'])->name('kits.models.update');
|
||||
)/* ->parameters([2 => 'kit_id', 1 => 'model_id'])*/->name('kits.models.update');
|
||||
|
||||
Route::get('models/{model_id}/edit',
|
||||
[Kits\PredefinedKitsController::class, 'editModel']
|
||||
|
@ -48,7 +48,7 @@ Route::group(['prefix' => 'kits/{kit_id}', 'middleware' => ['auth']], function (
|
|||
// Consumables
|
||||
Route::put('consumables/{consumable_id}',
|
||||
[Kits\PredefinedKitsController::class, 'updateConsumable']
|
||||
)->parameters([2 => 'kit_id', 1 => 'consumable_id'])->name('kits.consumables.update');
|
||||
)/*->parameters([2 => 'kit_id', 1 => 'consumable_id'])*/->name('kits.consumables.update');
|
||||
|
||||
Route::get('consumables/{consumable_id}/edit',
|
||||
[Kits\PredefinedKitsController::class, 'editConsumable']
|
||||
|
@ -61,7 +61,7 @@ Route::group(['prefix' => 'kits/{kit_id}', 'middleware' => ['auth']], function (
|
|||
// Accessories
|
||||
Route::put('accessories/{accessory_id}',
|
||||
[Kits\PredefinedKitsController::class, 'updateAccessory']
|
||||
)->parameters([2 => 'kit_id', 1 => 'accessory_id'])->name('kits.accessories.update');
|
||||
)/*->parameters([2 => 'kit_id', 1 => 'accessory_id'])*/->name('kits.accessories.update');
|
||||
|
||||
Route::get('accessories/{accessory_id}/edit',
|
||||
[Kits\PredefinedKitsController::class, 'editAccessory']
|
||||
|
|
Loading…
Reference in a new issue