Loading openflexure_microscope/api/v2/views/actions/camera.py +2 −2 Original line number Diff line number Diff line Loading @@ -6,7 +6,7 @@ from openflexure_microscope.common.flask_labthings.decorators import ( marshal_with, doc, tag, ltaction, ThingAction, doc_response, ) Loading @@ -19,7 +19,7 @@ import logging from flask import jsonify, request, abort, url_for, redirect, send_file @ltaction @ThingAction class CaptureAPI(Resource): """ Create a new image capture. Loading openflexure_microscope/common/flask_labthings/decorators.py +12 −8 Original line number Diff line number Diff line Loading @@ -71,17 +71,21 @@ def marshal_task(f): return wrapper def ltaction(f): def ThingAction(viewcls): # Pass params to call function attribute for external access update_spec(f, {"tags": ["actions"]}) update_spec(f, {"_groups": ["actions"]}) return f update_spec(viewcls, {"tags": ["actions"]}) update_spec(viewcls, {"_groups": ["actions"]}) return viewcls thing_action = ThingAction def ltproperty(f): def ThingProperty(viewcls): # Pass params to call function attribute for external access update_spec(f, {"tags": ["properties"]}) update_spec(f, {"_groups": ["properties"]}) return f update_spec(viewcls, {"tags": ["properties"]}) update_spec(viewcls, {"_groups": ["properties"]}) return viewcls thing_property = ThingProperty class use_args(object): def __init__(self, schema, **kwargs): Loading Loading
openflexure_microscope/api/v2/views/actions/camera.py +2 −2 Original line number Diff line number Diff line Loading @@ -6,7 +6,7 @@ from openflexure_microscope.common.flask_labthings.decorators import ( marshal_with, doc, tag, ltaction, ThingAction, doc_response, ) Loading @@ -19,7 +19,7 @@ import logging from flask import jsonify, request, abort, url_for, redirect, send_file @ltaction @ThingAction class CaptureAPI(Resource): """ Create a new image capture. Loading
openflexure_microscope/common/flask_labthings/decorators.py +12 −8 Original line number Diff line number Diff line Loading @@ -71,17 +71,21 @@ def marshal_task(f): return wrapper def ltaction(f): def ThingAction(viewcls): # Pass params to call function attribute for external access update_spec(f, {"tags": ["actions"]}) update_spec(f, {"_groups": ["actions"]}) return f update_spec(viewcls, {"tags": ["actions"]}) update_spec(viewcls, {"_groups": ["actions"]}) return viewcls thing_action = ThingAction def ltproperty(f): def ThingProperty(viewcls): # Pass params to call function attribute for external access update_spec(f, {"tags": ["properties"]}) update_spec(f, {"_groups": ["properties"]}) return f update_spec(viewcls, {"tags": ["properties"]}) update_spec(viewcls, {"_groups": ["properties"]}) return viewcls thing_property = ThingProperty class use_args(object): def __init__(self, schema, **kwargs): Loading