fipamo/routes/api.php
ro 166e19a656
AuthAPI, favicon tweak
Got the first part of the API working, which checks to see if there is a
valid session active to set up requests

also some small changes to get the favicon working, yeah, yeah, but it's
cool looking...
2024-03-07 12:04:52 -06:00

23 lines
683 B
PHP

<?php
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\API\AuthAPIController;
/*
|--------------------------------------------------------------------------
| 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::get("/v1/status", [AuthAPIController::class, 'status']);
Route::middleware('auth:sanctum')->get('/user', function (Request $request) {
return $request->user();
});