This commit is contained in:
Mateusz779 2023-04-13 12:30:44 +02:00
parent 40714f109b
commit 354963b353

4
db.py
View File

@ -113,8 +113,8 @@ def add_auth_token(user_id):
connect() connect()
with get_cur() as cur: with get_cur() as cur:
cur.execute(""" cur.execute("""
INSERT INTO auth_tokens (user_id, token) INSERT INTO auth_tokens (user_id, token, expries_on)
VALUES (%s, %s) VALUES (%s, %s, NOW() + INTERVAL '1 day')
""",(user_id,token,)) """,(user_id,token,))
conn.commit() conn.commit()
return token return token