blackbirdchess-server/routes/api.php

28 lines
1.0 KiB
PHP
Raw Permalink Normal View History

2023-02-01 17:10:21 +01:00
<?php
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!
|
*/
2023-03-20 19:16:03 +01:00
Route::get('/capabilities', [App\Http\Controllers\InfoController::class, 'capabilities']);
2023-08-16 15:14:19 +02:00
Route::post('/register/checkusertaken', [App\Http\Controllers\Auth\RegisteredUserController::class, 'checkUserTaken']);
Route::get('/register/checkusertaken', [App\Http\Controllers\Auth\RegisteredUserController::class, 'checkUserTaken']);
2023-02-01 17:10:21 +01:00
Route::middleware(['auth:sanctum'])->get('/user', function (Request $request) {
return $request->user();
});
2023-02-18 15:40:16 +01:00
Route::middleware(\App\Http\Middleware\EnsureTokenIsValid::class)
->get('/info', [\App\Http\Controllers\InfoController::class, 'info']);
2023-02-01 17:10:21 +01:00
require __DIR__.'/auth.php';