diff --git a/app.py b/app.py index 96a27ef..26f16af 100644 --- a/app.py +++ b/app.py @@ -12,6 +12,7 @@ import json import util +from entity_validator import validate startup_timestamp = datetime.now() @@ -74,12 +75,9 @@ class ValidateHandler(tornado.web.RequestHandler, metaclass=ABCMeta): entity = self.request.body.decode() - # TODO call validator - validation_result = { - "valid": "true" - } + validation_result = validate(json.loads(entity)) - self.write(validation_result) + self.write(json.dumps(validation_result)) self.finish()