* Plugins ergänzen eigene Endpunkte über routes/api.php (ebenfalls unter /api/v1). */ Route::prefix('v1')->group(function () { Route::post('/token', [AuthController::class, 'token'])->middleware('throttle:10,1'); Route::post('/token/exchange', [AppController::class, 'exchange'])->middleware('throttle:10,1'); Route::get('/config', [AppController::class, 'config'])->middleware('throttle:60,1'); Route::middleware('auth:sanctum')->group(function () { Route::get('/me', [AuthController::class, 'me']); Route::delete('/token', [AuthController::class, 'revoke']); Route::get('/notifications', [NotificationController::class, 'index']); Route::post('/notifications/read', [NotificationController::class, 'readAll']); Route::post('/notifications/{id}/read', [NotificationController::class, 'read']); Route::get('/people', [PeopleController::class, 'index']); Route::get('/people/{user}', [PeopleController::class, 'show'])->whereNumber('user'); Route::get('/search', SearchController::class); Route::post('/push/devices', [AppController::class, 'registerDevice'])->middleware('throttle:30,1'); Route::delete('/push/devices', [AppController::class, 'removeDevice']); }); });