Switched away from using JSONify

This commit is contained in:
Joel Collins 2020-04-24 16:05:01 +01:00
parent 4fffa1fcba
commit cda5cdbb44
9 changed files with 26 additions and 29 deletions

View file

@ -6,8 +6,6 @@ from openflexure_microscope.api.utilities.gui import build_gui
import logging
from flask import jsonify
# Some value that will change over time
# Here, we add 1 to it every time a GET request is made
val_int = 0
@ -81,7 +79,7 @@ class TestAPIView(View):
def get(self):
global val_int
val_int += 1
return jsonify({"val": True})
return {"val": True}
@ThingAction
@ -89,7 +87,7 @@ class TestDoAPIView(View):
def post(self):
global val_int
val_int += 1
return jsonify({"val": True})
return {"val": True}
# Using the dynamic form