mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-24 21:24:13 -08:00
Use pattern in API route
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
651001bf6e
commit
fbe9daace6
|
@ -504,21 +504,18 @@ Route::group(['prefix' => 'v1', 'middleware' => ['api', 'throttle:api']], functi
|
|||
]
|
||||
)->name('api.asset.to-audit');
|
||||
|
||||
// Get assets that are due or overdue for audit
|
||||
Route::get('audits/{status}',
|
||||
[
|
||||
Api\AssetsController::class,
|
||||
'index'
|
||||
]
|
||||
)->name('api.assets.to-audit');
|
||||
|
||||
// Get assets that are due or overdue for checkin
|
||||
Route::get('checkins/{status}',
|
||||
|
||||
// This gets the "due or overdue" API endpoints for audits and checkins
|
||||
Route::get('{action}/{upcoming_status}',
|
||||
[
|
||||
Api\AssetsController::class,
|
||||
'index'
|
||||
]
|
||||
)->name('api.asset.to-checkin');
|
||||
)->name('api.assets.list-upcoming')
|
||||
->where(['action' => 'audits|checkins', 'upcoming_status' => 'due|overdue|due-or-overdue']);
|
||||
|
||||
|
||||
|
||||
Route::post('audit',
|
||||
[
|
||||
|
|
Loading…
Reference in a new issue