fix(BE): routes api rest
This commit is contained in:
parent
60731cb49b
commit
ac7f2ea39f
3 changed files with 37 additions and 3 deletions
|
@ -30,8 +30,12 @@ class RouteServiceProvider extends ServiceProvider
|
|||
|
||||
$this->routes(function () {
|
||||
Route::middleware('api')
|
||||
->prefix('rest')
|
||||
->group(base_path('routes/api.php'));
|
||||
->prefix('rest/api')
|
||||
->group(base_path('routes/rest.php'));
|
||||
|
||||
Route::middleware('api')
|
||||
->prefix('api')
|
||||
->group(base_path('routes/api.php'));
|
||||
|
||||
Route::middleware('web')
|
||||
->group(base_path('routes/web.php'));
|
||||
|
|
|
@ -16,5 +16,16 @@ use Illuminate\Support\Facades\Route;
|
|||
|
|
||||
*/
|
||||
|
||||
Route::middleware('parsejson')->put('/media/{id}', [FileController::class, 'update'])->name('media.update');
|
||||
Route::middleware('auth:sanctum')->get('apiTest', [TestControllerXdebug::class, 'index']);
|
||||
|
||||
Route::get('update-liquidsoap-status', function () {
|
||||
return response()->json(['status' => 200]);
|
||||
});
|
||||
|
||||
Route::get('version', function () {
|
||||
return response()->json(['api_version' => '1.7.0']);
|
||||
});
|
||||
|
||||
Route::post('push-stream-stats', function () {
|
||||
return response()->json(['status' => 200]);
|
||||
});
|
19
routes/rest.php
Normal file
19
routes/rest.php
Normal file
|
@ -0,0 +1,19 @@
|
|||
<?php
|
||||
|
||||
use App\Http\Controllers\FileController;
|
||||
use Illuminate\Http\Request;
|
||||
use App\Http\Controllers\TestControllerXdebug;
|
||||
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 and all of them will
|
||||
| be assigned to the "api" middleware group. Make something great!
|
||||
|
|
||||
*/
|
||||
|
||||
Route::middleware('parsejson')->put('/media/{id}', [FileController::class, 'update'])->name('media.update');
|
Loading…
Add table
Add a link
Reference in a new issue