From 10199f896bf06f9fcc8eeff662066be1d448adc0 Mon Sep 17 00:00:00 2001 From: Claus Lohmar Date: Tue, 21 Jul 2026 18:17:41 +0000 Subject: [PATCH] fix: escape f-string braces in backend route decorators {job_id} in f-strings was interpreted as Python variable instead of FastAPI path parameter. Double braces {{job_id}} produce literal {job_id} in the route string. --- backend/app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/app.py b/backend/app.py index ae56a05..7cf6927 100644 --- a/backend/app.py +++ b/backend/app.py @@ -105,7 +105,7 @@ def create_job(req: JobSubmissionRequest) -> JobStatusResponse: raise HTTPException(status_code=400, detail=str(exc)) -@app.get(f"{API_PREFIX}/jobs/{job_id}", response_model=JobStatusResponse) +@app.get(f"{API_PREFIX}/jobs/{{job_id}}", response_model=JobStatusResponse) def job_status(job_id: str) -> JobStatusResponse: """Get current status of a conversion job.""" try: @@ -114,7 +114,7 @@ def job_status(job_id: str) -> JobStatusResponse: raise HTTPException(status_code=404, detail=f"Job not found: {job_id}") -@app.post(f"{API_PREFIX}/jobs/{job_id}/cleanup", response_model=CleanupResponse) +@app.post(f"{API_PREFIX}/jobs/{{job_id}}/cleanup", response_model=CleanupResponse) def cleanup_job(job_id: str, req: CleanupRequest) -> CleanupResponse: """Delete or preserve staging files for a job.""" try: