From 453250b862e9fb6ab9c2e3043d36bd6ed885af92 Mon Sep 17 00:00:00 2001 From: csd4ni3l Date: Sun, 10 Aug 2025 17:01:09 +0200 Subject: [PATCH] update register fields i missed --- main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index a47f4e7..86252e7 100644 --- a/main.py +++ b/main.py @@ -4,7 +4,7 @@ from constants import RICKROLL_LINK, UPLOAD_DIR, MINIMUM_COSINE_SIMILARITY, DATA from jina import get_grass_touching_similarity 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"): load_dotenv(".env") @@ -127,7 +127,7 @@ def register(): salt = bcrypt.gensalt() 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() cur.close()