forked from alexjustesen/speedtest-tracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapi.php
More file actions
31 lines (26 loc) · 1.03 KB
/
api.php
File metadata and controls
31 lines (26 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
use App\Http\Controllers\API\HealthCheckController;
use App\Http\Controllers\API\Speedtest\GetLatestController;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;
/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/
Route::middleware('auth:sanctum')->get('/user', function (Request $request) {
return $request->user();
});
Route::get('/healthcheck', HealthCheckController::class);
/**
* This route provides backwards compatibility from https://github.com/henrywhitaker3/Speedtest-Tracker
* for Homepage and Organizr dashboards which expects the returned
* download and upload values in mbits.
*/
Route::get('/speedtest/latest', GetLatestController::class)
->name('speedtest.latest');