Skip to content

Commit

Permalink
bug fix json response content
Browse files Browse the repository at this point in the history
  • Loading branch information
jmargutt committed Nov 2, 2024
1 parent c304a17 commit f7c1b22
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions routes/routesKobo.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,8 +313,10 @@ async def kobo_to_linked_kobo(
if response.status_code == 200:
logger.info("Success", extra=extra_logs)
update_submission_status(submission, "success")
return JSONResponse(status_code=200, content="Success")
return JSONResponse(status_code=200, content={"detail": "Success"})
else:
logger.error("Failed", extra=extra_logs)
update_submission_status(submission, "failed", response.content)
return JSONResponse(status_code=response.status_code, content="Failed")
return JSONResponse(
status_code=response.status_code, content={"detail": "Failed"}
)

0 comments on commit f7c1b22

Please sign in to comment.