validation endpoint implementation #7

Merged
tux merged 19 commits from experiments-cerberus into master 2021-01-05 14:34:02 +01:00
Showing only changes of commit b32dfda01e - Show all commits

8
app.py
View file

@ -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()