From f30679d4db36505cb8a82c331aff333b9767814a Mon Sep 17 00:00:00 2001 From: samuelmcdermott Date: Mon, 12 Oct 2020 16:56:25 +0100 Subject: [PATCH] stage API returns a dict --- openflexure_microscope/api/v2/views/actions/stage.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/openflexure_microscope/api/v2/views/actions/stage.py b/openflexure_microscope/api/v2/views/actions/stage.py index c805d7e9..525a1d5b 100644 --- a/openflexure_microscope/api/v2/views/actions/stage.py +++ b/openflexure_microscope/api/v2/views/actions/stage.py @@ -76,14 +76,12 @@ class StageTypeAPI(ActionView): """ microscope = find_component("org.openflexure.microscope") microscope.set_stage(stage_type=args.get("stage_type")) - - # TODO: Make schema for microscope state - return microscope.configuration["stage"]["type"] + return {"stage_type": microscope.configuration["stage"]["type"]} def get(self): """ Get the stage geometry. """ microscope = find_component("org.openflexure.microscope") - return microscope.configuration["stage"]["type"] + return {"stage_type": microscope.configuration["stage"]["type"]}