Skip to content

Commit

Permalink
set content-type to json for beamline get routes
Browse files Browse the repository at this point in the history
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'.
  • Loading branch information
elmjag authored and marcus-oscarsson committed Sep 10, 2024
1 parent 8a75705 commit fc962b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mxcubeweb/routes/beamline.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}/<string:name>/{attr}"
endpoint = f"{atype}_{attr}"
Expand Down

0 comments on commit fc962b5

Please sign in to comment.