feat: add template selector to batch detail for CV generation

This commit is contained in:
root
2026-07-25 09:49:43 +00:00
parent 0905290f9b
commit 0c64a4679f
6 changed files with 55 additions and 4 deletions

View File

@@ -913,12 +913,12 @@ async def get_batch(batch_id: str):
@app.put("/api/batches/{batch_id}")
async def update_batch(batch_id: str, request: Request):
"""Update batch name/description."""
"""Update batch name/description/template."""
body = await request.json()
row = db.execute(
"""UPDATE cv_batches SET name = %s, description = %s, updated_at = NOW()
"""UPDATE cv_batches SET name = %s, description = %s, template_id = %s, updated_at = NOW()
WHERE id = %s RETURNING *""",
(body.get("name"), body.get("description"), batch_id)
(body.get("name"), body.get("description"), body.get("template_id"), batch_id)
)
if not row:
raise HTTPException(404, "Batch not found")