From 754ec7563ad653454c4ab2b001784d3d2376dbbd Mon Sep 17 00:00:00 2001 From: snipe Date: Fri, 29 Sep 2023 15:15:03 +0100 Subject: [PATCH] Fixed consumable user view route name Signed-off-by: snipe --- resources/views/consumables/view.blade.php | 2 +- routes/api.php | 10 +--------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/resources/views/consumables/view.blade.php b/resources/views/consumables/view.blade.php index 26265a3d74..80987335ff 100644 --- a/resources/views/consumables/view.blade.php +++ b/resources/views/consumables/view.blade.php @@ -74,7 +74,7 @@ data-sort-name="name" id="consumablesCheckedoutTable" class="table table-striped snipe-table" - data-url="{{route('api.consumables.showUsers', $consumable->id)}}" + data-url="{{route('api.consumables.show.users', $consumable->id)}}" data-export-options='{ "fileName": "export-consumables-{{ str_slug($consumable->name) }}-checkedout-{{ date('Y-m-d') }}", "ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"] diff --git a/routes/api.php b/routes/api.php index 4b8866dc2f..2ae1bfe559 100644 --- a/routes/api.php +++ b/routes/api.php @@ -280,17 +280,9 @@ Route::group(['prefix' => 'v1', 'middleware' => ['api', 'throttle:api']], functi Api\ConsumablesController::class, 'getDataView' ] - )->name('api.consumables.showUsers'); + )->name('api.consumables.show.users'); - // This is LEGACY endpoint URL and should be removed in the next major release - Route::get('view/{id}/users', - [ - Api\ConsumablesController::class, - 'getDataView' - ] - )->name('api.consumables.showUsers'); - Route::post('{consumable}/checkout', [ Api\ConsumablesController::class,