<?php

use Functional\Users\Http\Controllers\AuthController;
use Functional\Users\Http\Controllers\PushController;
use Illuminate\Support\Facades\Route;

// Le préfixe api/ est ajouté par UsersServiceProvider::withRouting().
Route::middleware('auth:sanctum')->group(function () {
    Route::get('me', [AuthController::class, 'me']);
    Route::patch('me', [AuthController::class, 'update']);

    // Web Push (rappels de série pilotés par le back)
    Route::post('push/subscribe', [PushController::class, 'subscribe']);
    Route::post('push/unsubscribe', [PushController::class, 'unsubscribe']);
    Route::post('push/test', [PushController::class, 'test']);
});
