added export logging

This commit is contained in:
2026-02-18 00:56:56 +01:00
parent d14dec044f
commit 9769f509a7

View File

@@ -369,6 +369,7 @@ def serve_export(deck, course_folder, path):
deck_path = os.path.join(exports_dir, deck_obj.deck) deck_path = os.path.join(exports_dir, deck_obj.deck)
requested_file = os.path.join(deck_path, path) requested_file = os.path.join(deck_path, path)
if os.path.isfile(requested_file): if os.path.isfile(requested_file):
current_app.logger.info(f"User {get_token().name if get_token() else 'Anon'} exported deck {deck_obj.name}")
return send_from_directory(deck_path, path) return send_from_directory(deck_path, path)
log_404("Export file missing", deck, course_folder, path) log_404("Export file missing", deck, course_folder, path)