feat(02-01): backend prompts router with 4 CRUD endpoints
- GET /api/prompts — list all prompts with modified/default flag
- GET /api/prompts/{name} — read prompt content + required variables
- PUT /api/prompts/{name} — save modified prompt with validation
- POST /api/prompts/{name}/reset — restore prompt to default
- Lazy PromptService init to handle lifespan directory creation
- Router registered in main.py before SPA catch-all
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -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, settings
|
||||
from backend.routers import calendar, export, generate, prompts, settings
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
@@ -91,6 +91,7 @@ app.include_router(calendar.router)
|
||||
app.include_router(generate.router)
|
||||
app.include_router(export.router)
|
||||
app.include_router(settings.router)
|
||||
app.include_router(prompts.router)
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user