A free open source IT asset/license management system
Added an explanation for folks trying to access the API base endpoint with no real endpoint
snipe81bf41a091b9
diff --git a/routes/api.php b/routes/api.phpindex 569b9533f8..2c6a6ab26a 100644--- a/routes/api.php+++ b/routes/api.php@@ -16,6 +16,20 @@ use Illuminate\Http\Request;Route::group(['prefix' => 'v1','namespace' => 'Api', 'middleware' => 'auth:api'], function () {++ Route::get('/', function() {++ return response()->json(+ [+ 'status' => 'error',+ 'message' => '404 endpoint not found. This is the base URL for the API and does not return anything itself. Please check the API reference at https://snipe-it.readme.io/reference to find a valid API endpoint.',+ 'payload' => null,+ ], 404);+ });++++Route::group(['prefix' => 'account'], function () {Route::get('requestable/hardware',@@ -990,6 +1004,15 @@ Route::group(['prefix' => 'v1','namespace' => 'Api', 'middleware' => 'auth:api']}); // kits group+ Route::fallback(function(){+ return response()->json(+ [+ 'status' => 'error',+ 'message' => '404 endpoint not found. Please check the API reference at https://snipe-it.readme.io/reference to find a valid API endpoint.',+ 'payload' => null,+ ], 404);+ });+});