getting last_login changes
This commit is contained in:
parent
719b9d7000
commit
405639329c
|
|
@ -125,7 +125,12 @@ def list_patchnotes(since: str | None = None):
|
|||
"""GET /patchnotes – liefert neue Patchnotes und setzt last_login."""
|
||||
|
||||
user_id = current_user_id() # 1) aktueller Benutzer
|
||||
last_login = last_login_collection.find_one({"user_id": user_id}, {"last_login"})
|
||||
last_login_doc = last_login_collection.find_one(
|
||||
{"user_id": user_id},
|
||||
{"_id": 0, "last_login": 1}
|
||||
)
|
||||
last_login = last_login_doc.get("last_login") if last_login_doc else None
|
||||
|
||||
query = {}
|
||||
logging.info("since" + str(since))
|
||||
logging.info("last_login" + str(last_login))
|
||||
|
|
@ -143,7 +148,7 @@ def list_patchnotes(since: str | None = None):
|
|||
query = {
|
||||
"patch_date": {
|
||||
"$gte": since,
|
||||
"$lte": last_login.last_login
|
||||
"$lte": last_login
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue