Added the ability to send the ID for the listening

This commit is contained in:
Tiago Ribeiro
2024-07-30 22:34:31 +01:00
parent 1f29ac6ee5
commit 6878e0a276

2
app.py
View File

@@ -180,7 +180,7 @@ def save_listening():
difficulty = data.get('difficulty', random.choice(difficulties)) difficulty = data.get('difficulty', random.choice(difficulties))
template = getListeningTemplate() template = getListeningTemplate()
template['difficulty'] = difficulty template['difficulty'] = difficulty
id = str(uuid.uuid4()) id = data.get('id', str(uuid.uuid4()))
for i, part in enumerate(parts, start=0): for i, part in enumerate(parts, start=0):
part_template = getListeningPartTemplate() part_template = getListeningPartTemplate()