From 8bf3a017837dfaae0210cfd0d7a7d75ae6a1d45c Mon Sep 17 00:00:00 2001 From: raven Date: Fri, 18 Jun 2021 21:24:00 +0000 Subject: make it actually record the join date --- apioforum/auth.py | 5 +++-- 1 file 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") -- cgit v1.2.3