aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorraven <raven>2021-06-18 21:24:00 +0000
committerraven <raven>2021-06-18 21:24:00 +0000
commit8bf3a017837dfaae0210cfd0d7a7d75ae6a1d45c (patch)
treee01421442762f78006958ca97c61451ba9e86a66
parenta1cc107b3c65ff110124576d3609043f593a67f4 (diff)
make it actually record the join date
-rw-r--r--apioforum/auth.py5
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")