<?php

use App\Http\Controllers\EntryController;
use App\Http\Controllers\TextWidgetController;
use Illuminate\Support\Facades\Route;

Route::middleware('auth:sanctum')->group(function () {
    Route::get('/entries', [EntryController::class, 'index']);
    Route::post('/entries', [EntryController::class, 'store']);
    Route::get('/entries/{entry}', [EntryController::class, 'show']);
    Route::put('/entries/{entry}', [EntryController::class, 'update']);
    Route::delete('/entries/{entry}', [EntryController::class, 'destroy']);

    Route::get('/text-widgets', [TextWidgetController::class, 'index']);
    Route::post('/text-widgets', [TextWidgetController::class, 'store']);
    Route::get('/text-widgets/{textWidget}', [TextWidgetController::class, 'show']);
    Route::put('/text-widgets/{textWidget}', [TextWidgetController::class, 'update']);
    Route::delete('/text-widgets/{textWidget}', [TextWidgetController::class, 'destroy']);
});
