mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
fixes #12532 adds version endpoint
This commit is contained in:
parent
248eb0885c
commit
d2ede75de8
|
@ -1162,6 +1162,17 @@ Route::group(['prefix' => 'v1', 'middleware' => ['api', 'throttle:api']], functi
|
||||||
)->name('api.activity.index');
|
)->name('api.activity.index');
|
||||||
}); // end reports api routes
|
}); // end reports api routes
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Version API routes
|
||||||
|
*/
|
||||||
|
|
||||||
|
Route::get('/version', function () {
|
||||||
|
return response()->json(
|
||||||
|
[
|
||||||
|
'version' => config('version.app_version'),
|
||||||
|
], 200);
|
||||||
|
}); // end version api routes
|
||||||
|
|
||||||
|
|
||||||
Route::fallback(function () {
|
Route::fallback(function () {
|
||||||
return response()->json(
|
return response()->json(
|
||||||
|
@ -1172,5 +1183,4 @@ Route::group(['prefix' => 'v1', 'middleware' => ['api', 'throttle:api']], functi
|
||||||
], 404);
|
], 404);
|
||||||
}); // end fallback routes
|
}); // end fallback routes
|
||||||
|
|
||||||
|
|
||||||
}); // end API routes
|
}); // end API routes
|
||||||
|
|
Loading…
Reference in a new issue