Removed old JSONResponse class

This commit is contained in:
Joel Collins 2020-11-12 13:50:48 +00:00
parent 7c450b6214
commit b350f62013
5 changed files with 26 additions and 90 deletions

View file

@ -11,8 +11,6 @@ from labthings.schema import Schema, pre_dump
from labthings.utilities import description_from_view
from labthings.views import ActionView, PropertyView, View
from openflexure_microscope.devel import JsonResponse, request
class ZipObjectSchema(Schema):
id = fields.String()
@ -128,12 +126,15 @@ default_zip_manager = ZipManager()
class ZipBuilderAPIView(ActionView):
def post(self):
ids = list(JsonResponse(request).json)
args = fields.List(fields.String(), required=True)
def post(self, args):
microscope = find_component("org.openflexure.microscope")
# Return a handle on the autofocus task
return default_zip_manager.marshaled_build_zip_from_capture_ids(microscope, ids)
return default_zip_manager.marshaled_build_zip_from_capture_ids(
microscope, args
)
class ZipListAPIView(PropertyView):