Removed debug routes

This commit is contained in:
Joel Collins 2019-12-18 15:00:08 +00:00
parent 15a6f13cd5
commit a77ed8e273

View file

@ -86,6 +86,7 @@ handler = JSONExceptionHandler(app)
# Build a labthing
labthing = LabThing(app, prefix="/api/v2")
labthing.description = "Test LabThing-based API for OpenFlexure Microscope"
labthing.title = f"OpenFlexure Microscope {api_microscope.name}"
# Attach lab devices
labthing.register_device(api_microscope, "openflexure_microscope")
@ -146,26 +147,6 @@ def routes():
return jsonify(list_routes(app))
@app.route("/props")
def props():
p = {}
for key, prop in labthing.properties.items():
p[key] = {}
p[key]["view"] = prop
p[key]["url"] = labthing.url_for(prop, _external=True)
return jsonify(p)
@app.route("/ac")
def actions():
p = {}
for key, prop in labthing.actions.items():
p[key] = {}
p[key]["view"] = prop
p[key]["url"] = labthing.url_for(prop, _external=True)
return jsonify(p)
@app.route("/log")
def err_log():
"""