feat: add template selector to batch detail for CV generation
This commit is contained in:
6
main.py
6
main.py
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user