use entity validator in app

This commit is contained in:
David Kilias 2020-12-04 21:18:37 +01:00
parent 403ce3a258
commit b32dfda01e

8
app.py
View file

@ -12,6 +12,7 @@ import json
import util import util
from entity_validator import validate
startup_timestamp = datetime.now() startup_timestamp = datetime.now()
@ -74,12 +75,9 @@ class ValidateHandler(tornado.web.RequestHandler, metaclass=ABCMeta):
entity = self.request.body.decode() entity = self.request.body.decode()
# TODO call validator validation_result = validate(json.loads(entity))
validation_result = {
"valid": "true"
}
self.write(validation_result) self.write(json.dumps(validation_result))
self.finish() self.finish()