bug
This commit is contained in:
parent
40714f109b
commit
354963b353
4
db.py
4
db.py
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user