<?php

use App\Http\Controllers\Api\AuthController;
use App\Http\Controllers\Api\SampleResultController;
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::post('/login', [AuthController::class, 'login']);
Route::middleware('auth:api')->group(function(){

    Route::post('/logout', [AuthController::class, 'logout']);
    Route::post('/result/push', [SampleResultController::class, 'pushLabResult']);
//    Route::get('/result/push', function (Request $request){
//        return $request->user()->token();
//    });
});
