feat(03-01): SwipeService CRUD + Pydantic schemas + FastAPI router

- backend/schemas/swipe.py: SwipeItem, SwipeItemCreate, SwipeItemUpdate, SwipeListResponse
- backend/services/swipe_service.py: SwipeService con load/save/add/update/delete/mark_used su swipe_file.json
- backend/routers/swipe.py: 5 endpoint REST (GET/POST/PUT/DELETE/mark-used), lazy init pattern
- backend/main.py: registra swipe.router prima del SPA catch-all mount
This commit is contained in:
Michele
2026-03-09 00:22:12 +01:00
parent 05988f4be5
commit d64c7f4524
4 changed files with 376 additions and 1 deletions

View File

@@ -14,7 +14,7 @@ from fastapi.responses import FileResponse
from fastapi.staticfiles import StaticFiles
from backend.config import CAMPAIGNS_PATH, CONFIG_PATH, OUTPUTS_PATH, PROMPTS_PATH
from backend.routers import calendar, export, generate, prompts, settings
from backend.routers import calendar, export, generate, prompts, settings, swipe
# ---------------------------------------------------------------------------
@@ -92,6 +92,7 @@ app.include_router(generate.router)
app.include_router(export.router)
app.include_router(settings.router)
app.include_router(prompts.router)
app.include_router(swipe.router)
# ---------------------------------------------------------------------------