From d2ede75de898a6d765e11319fba32cfa0c46e3bd Mon Sep 17 00:00:00 2001 From: Andrew Savinykh <658865+AndrewSav@users.noreply.github.com> Date: Mon, 20 Feb 2023 22:19:18 +1300 Subject: [PATCH] fixes #12532 adds version endpoint --- routes/api.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/routes/api.php b/routes/api.php index 37bc3baa8d..2429ffa853 100644 --- a/routes/api.php +++ b/routes/api.php @@ -1162,6 +1162,17 @@ Route::group(['prefix' => 'v1', 'middleware' => ['api', 'throttle:api']], functi )->name('api.activity.index'); }); // 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 () { return response()->json( @@ -1172,5 +1183,4 @@ Route::group(['prefix' => 'v1', 'middleware' => ['api', 'throttle:api']], functi ], 404); }); // end fallback routes - }); // end API routes