Add debug statements

This commit is contained in:
Oskar Winkels 2021-11-11 19:03:45 +01:00
parent 99da9da68a
commit 27f8b6d5d0
Signed by: o.winkels
GPG Key ID: E7484A06E99DAEF1
1 changed files with 4 additions and 0 deletions

View File

@ -24,6 +24,8 @@ def startup():
finally:
fd.close()
print("Read", len(data), "quizzes from DB")
@app.route('/db/<id>', methods = ['GET'])
def get(id):
@ -47,6 +49,8 @@ def post():
id = generateNewKey()
data[id] = request.data.decode('UTF-8')
print("Received new quiz. ID:", id)
try:
fd = open(filename, 'w+')
json.dump(data, fd, indent=2)