Skip to content

Commit

Permalink
Merge pull request #11541 from Godmartinz/gh11540_Error_405_when_chec…
Browse files Browse the repository at this point in the history
…king_out_Accessory

Fixes #11540 - accessory api routes from get to posts
  • Loading branch information
snipe committed Jul 20, 2022
2 parents e72c4f9 + 377c0e7 commit 0b4d243
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions routes/api.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,15 @@
]
)->name('api.accessories.checkedout');

Route::get('{accessory}/checkout',
Route::post('{accessory}/checkout',
[
Api\AccessoriesController::class,
'checkout'
]
)->name('api.accessories.checkout');


Route::get('{accessory}/checkin',
Route::post('{accessory}/checkin',
[
Api\AccessoriesController::class,
'checkin'
Expand Down Expand Up @@ -236,7 +236,20 @@
]
)->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',
Expand Down Expand Up @@ -274,7 +287,7 @@
]
)->name('api.consumables.showUsers');

Route::get('{consumable}/checkout',
Route::post('{consumable}/checkout',
[
Api\ConsumablesController::class,
'checkout'
Expand Down

0 comments on commit 0b4d243

Please sign in to comment.