update register fields i missed

This commit is contained in:
csd4ni3l
2025-08-10 17:01:09 +02:00
parent 0307999db7
commit 453250b862

View File

@@ -4,7 +4,7 @@ from constants import RICKROLL_LINK, UPLOAD_DIR, MINIMUM_COSINE_SIMILARITY, DATA
from jina import get_grass_touching_similarity from jina import get_grass_touching_similarity
from PIL import Image from PIL import Image
import os, flask_login, uuid, base64, sqlite3, bcrypt, secrets, hashlib import os, flask_login, uuid, base64, sqlite3, bcrypt, secrets, hashlib, time
if os.path.exists(".env"): if os.path.exists(".env"):
load_dotenv(".env") load_dotenv(".env")
@@ -127,7 +127,7 @@ def register():
salt = bcrypt.gensalt() salt = bcrypt.gensalt()
hashed_password = bcrypt.hashpw(password.encode(), salt) hashed_password = bcrypt.hashpw(password.encode(), salt)
cur.execute("INSERT INTO Users (username, password, password_salt) VALUES (?, ?, ?)", (username, hashed_password.decode(), salt.decode())) cur.execute("INSERT INTO Users (username, password, password_salt, last_grass_touch_time, grass_touching_count, banned) VALUES (?, ?, ?, ?, ?, ?)", (username, hashed_password.decode(), salt.decode(), time.time(), 1, False))
get_db().commit() get_db().commit()
cur.close() cur.close()