fix: Korrigiere Flask-Methoden und JSON-Formatfehler in der Anwendung

Co-authored-by: aider (ollama_chat/qwen3-coder:30b) <aider@aider.chat>
This commit is contained in:
jamulix 2025-10-21 15:03:20 +02:00
commit da643f5086

7
app.py
View file

@ -42,9 +42,8 @@ if not lessons:
print("Keine Lektionen verfügbar, verwende Fallback-Lektionen")
lessons = FALLBACK_LESSONS
@app.before_first_request
def create_tables():
"""Erstelle Datenbanktabellen beim ersten Request"""
# Datenbanktabellen erstellen
with app.app_context():
db.create_all()
print("Datenbanktabellen wurden initialisiert")
@ -243,9 +242,7 @@ def end_session():
if __name__ == '__main__':
with app.app_context():
db.create_all()
print("Datenbank initialisiert")
print(f"{len(lessons)} Lektionen geladen")
app.run(debug=True)