mirror of
https://github.com/snipe/snipe-it.git
synced 2025-02-21 03:15:45 -08:00
Merge pull request #11541 from Godmartinz/gh11540_Error_405_when_checking_out_Accessory
Fixes #11540 - accessory api routes from get to posts
This commit is contained in:
commit
0b4d243bf0
|
@ -86,7 +86,7 @@ Route::group(['prefix' => 'v1', 'middleware' => ['api', 'throttle:api']], functi
|
|||
]
|
||||
)->name('api.accessories.checkedout');
|
||||
|
||||
Route::get('{accessory}/checkout',
|
||||
Route::post('{accessory}/checkout',
|
||||
[
|
||||
Api\AccessoriesController::class,
|
||||
'checkout'
|
||||
|
@ -94,7 +94,7 @@ Route::group(['prefix' => 'v1', 'middleware' => ['api', 'throttle:api']], functi
|
|||
)->name('api.accessories.checkout');
|
||||
|
||||
|
||||
Route::get('{accessory}/checkin',
|
||||
Route::post('{accessory}/checkin',
|
||||
[
|
||||
Api\AccessoriesController::class,
|
||||
'checkin'
|
||||
|
@ -237,6 +237,19 @@ Route::group(['prefix' => 'v1', 'middleware' => ['api', 'throttle:api']], functi
|
|||
)->name('api.components.assets');
|
||||
|
||||
});
|
||||
Route::post('components/{id}/checkin',
|
||||
[
|
||||
Api\ComponentsController::class,
|
||||
'checkin'
|
||||
]
|
||||
)->name('api.components.checkin');
|
||||
|
||||
Route::post('components/{id}/checkout',
|
||||
[
|
||||
Api\ComponentsController::class,
|
||||
'checkout'
|
||||
]
|
||||
)->name('api.components.checkout');
|
||||
|
||||
|
||||
Route::resource('components',
|
||||
|
@ -274,7 +287,7 @@ Route::group(['prefix' => 'v1', 'middleware' => ['api', 'throttle:api']], functi
|
|||
]
|
||||
)->name('api.consumables.showUsers');
|
||||
|
||||
Route::get('{consumable}/checkout',
|
||||
Route::post('{consumable}/checkout',
|
||||
[
|
||||
Api\ConsumablesController::class,
|
||||
'checkout'
|
||||
|
|
Loading…
Reference in a new issue