Add debug statements
This commit is contained in:
parent
99da9da68a
commit
27f8b6d5d0
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue