From f7c1b22f99653ab903722a2f949cdd99e02d8960 Mon Sep 17 00:00:00 2001 From: Jacopo Margutti Date: Sat, 2 Nov 2024 14:06:10 +0100 Subject: [PATCH] bug fix json response content --- routes/routesKobo.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/routes/routesKobo.py b/routes/routesKobo.py index 19ca38f..f8f4564 100644 --- a/routes/routesKobo.py +++ b/routes/routesKobo.py @@ -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"} + )