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