From fc962b5fcc95a6604f9db07fb9e79a11bd64366f Mon Sep 17 00:00:00 2001 From: Elmir Jagudin Date: Tue, 10 Sep 2024 11:36:51 +0200 Subject: [PATCH] set content-type to json for beamline get routes For beamline 'get attributes' routes, make sure Content-Type header is 'application/json'. The front-end is now checking the content-type header for replies, and assumes an error unless it is set to 'application/json'. --- mxcubeweb/routes/beamline.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mxcubeweb/routes/beamline.py b/mxcubeweb/routes/beamline.py index b71dadfed..503c39df8 100644 --- a/mxcubeweb/routes/beamline.py +++ b/mxcubeweb/routes/beamline.py @@ -26,7 +26,7 @@ def get_func(name): **{"return": getattr(app.mxcubecore.get_adapter(name), attr)(**args)} ) - return make_response(result.json(), 200) + return make_response(result.dict(), 200) route_url = f"{atype}//{attr}" endpoint = f"{atype}_{attr}"