Skip to content

Commit 747776f

Browse files
authored
[Feature] Added heathcheck API route (alexjustesen#1230)
1 parent ed1106c commit 747776f

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
3+
namespace App\Http\Controllers\API;
4+
5+
use App\Http\Controllers\Controller;
6+
7+
class HealthCheckController extends Controller
8+
{
9+
/**
10+
* Handle the incoming request.
11+
*/
12+
public function __invoke()
13+
{
14+
return response()->json([
15+
'message' => 'Speedtest Tracker is running!',
16+
]);
17+
}
18+
}

routes/api.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?php
22

3+
use App\Http\Controllers\API\HealthCheckController;
34
use App\Http\Controllers\API\Speedtest\GetLatestController;
45
use Illuminate\Http\Request;
56
use Illuminate\Support\Facades\Route;
@@ -19,6 +20,8 @@
1920
return $request->user();
2021
});
2122

23+
Route::get('/healthcheck', HealthCheckController::class);
24+
2225
/**
2326
* This route provides backwards compatibility from https://github.com/henrywhitaker3/Speedtest-Tracker
2427
* for Homepage and Organizr dashboards which expects the returned

0 commit comments

Comments
 (0)