refactor: remove session_time from user.login

The parameter is not used, we can remove it and adapt the callers.

Signed-off-by: moson-mo <mo-son@mailbox.org>
This commit is contained in:
moson-mo 2023-05-26 23:02:38 +02:00
parent 22fe4a988a
commit a7882c7533
No known key found for this signature in database
GPG key ID: 4A4760AB4EE15296
4 changed files with 6 additions and 32 deletions

View file

@ -2,7 +2,7 @@ from typing import Any
from fastapi import Request
from aurweb import cookies, db, models, time, util
from aurweb import db, models, time, util
from aurweb.models import SSHPubKey
from aurweb.models.ssh_pub_key import get_fingerprint
from aurweb.util import strtobool
@ -131,11 +131,9 @@ def password(
user.update_password(P)
if user == request.user:
remember_me = request.cookies.get("AURREMEMBER") == "True"
# If the target user is the request user, login with
# the updated password to update the Session record.
user.login(request, P, cookies.timeout(remember_me))
user.login(request, P)
@db.retry_deadlock