Fix api routes

This commit is contained in:
Jérémy Munsch 2022-06-15 13:31:46 +02:00
parent b16b4a2107
commit dded73e14a
No known key found for this signature in database
GPG key ID: 18361AF3BFEC0FEC
2 changed files with 6 additions and 1 deletions

View file

@ -36,6 +36,10 @@ class RouteServiceProvider extends ServiceProvider
Route::middleware('web')
->namespace($this->namespace)
->group(base_path('routes/web-fo.php'));
Route::middleware('api')
->namespace($this->namespace)
->group(base_path('routes/api.php'));
});
}

View file

@ -1,9 +1,10 @@
<?php
use App\Http\Controllers\API\LDCNetworksController;
use App\Http\Controllers\API\StatusCheckerController;
use Illuminate\Support\Facades\Route;
Route::middleware('apiCheck')->group(function () {
Route::prefix('/api')->middleware('apiCheck')->group(function () {
Route::post('/status-checker', [StatusCheckerController::class, 'index']);
Route::get('/ldc-networks', [LDCNetworksController::class, 'index']);
});