aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-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")