diff options
author | raven <raven> | 2021-06-18 21:24:00 +0000 |
---|---|---|
committer | raven <raven> | 2021-06-18 21:24:00 +0000 |
commit | 8bf3a017837dfaae0210cfd0d7a7d75ae6a1d45c (patch) | |
tree | e01421442762f78006958ca97c61451ba9e86a66 | |
parent | a1cc107b3c65ff110124576d3609043f593a67f4 (diff) |
make it actually record the join date
-rw-r--r-- | apioforum/auth.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/apioforum/auth.py b/apioforum/auth.py index 80407eb..dae7b03 100644 --- a/apioforum/auth.py +++ b/apioforum/auth.py @@ -5,6 +5,7 @@ from flask import ( from werkzeug.security import check_password_hash, generate_password_hash from .db import get_db import functools +import datetime bp = Blueprint("auth", __name__, url_prefix="/auth") @@ -57,8 +58,8 @@ def register(): if err is None: db.execute( - "INSERT INTO users (username, password) VALUES (?,?);", - (username,generate_password_hash(password)) + "INSERT INTO users (username, password, joined) VALUES (?,?,?);", + (username,generate_password_hash(password),datetime.datetime.now()) ) db.commit() flash("successfully created account") |