added logs for debugging

This commit is contained in:
Justin Weins 2025-06-26 10:34:55 +02:00
parent b58b56249a
commit 58645f87ea
1 changed files with 3 additions and 0 deletions

View File

@ -126,7 +126,9 @@ def list_patchnotes(since: str | None = None):
user_id = current_user_id() # 1) aktueller Benutzer
last_login = last_login_collection.find_one({"user_id": user_id}, {"last_login"})
query = {}
logging.info("since" +since)
if since:
logging.info("Went into if since")
query = {
"patch_date": {
"$gte": last_login,
@ -145,6 +147,7 @@ def list_patchnotes(since: str | None = None):
# 3) Datum validieren (nur wenn vorhanden)
elif since is None:
logging.info("Went into if since is None")
try:
docs = collection.find({})
for d in docs: