We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8ccc304 commit 267f2fdCopy full SHA for 267f2fd
app.py
@@ -49,12 +49,13 @@ def get_vocabulary():
49
50
@app.route("/api/vocabulary/", methods=["POST"])
51
def post_vocabulary():
52
+ global vocabulary
53
+
54
# Check whether all fields have a value
55
for i in ["answer", "question"]:
56
for j in range(1, 11):
57
if not request.form.get(i + str(j)):
58
return jsonify({"error": "Nicht alles ausgefüllt"})
-
59
vocabulary = [
60
{"question": request.form.get("question1"), "answer": request.form.get("answer1")},
61
{"question": request.form.get("question2"), "answer": request.form.get("answer2")},
0 commit comments