From 10303accd2fc72896746079b95249a33f9a38b36 Mon Sep 17 00:00:00 2001 From: Esa Kataja Date: Sun, 1 Dec 2024 22:15:58 +0200 Subject: [PATCH] Change Add default users --- src/lib/database/database.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/lib/database/database.py b/src/lib/database/database.py index beb8e80..c3bb514 100644 --- a/src/lib/database/database.py +++ b/src/lib/database/database.py @@ -36,8 +36,5 @@ def init_db(): hashed_password = bcrypt.hashpw("password".encode("utf-8"), bcrypt.gensalt()) - sql = f"INSERT INTO users (username, password, is_admin) VALUES ('admin', '{hashed_password.decode('utf-8')}', true)" - db_run(sql) - - sql = f"INSERT INTO users (username, password, is_admin) VALUES ('test', '{hashed_password.decode('utf-8')}', false)" + sql = f"INSERT INTO users (username, password, is_admin) VALUES ('admin', '{hashed_password.decode('utf-8')}', true), ('kessinen', '{hashed_password.decode('utf-8')}', false), ('jensku', '{hashed_password.decode('utf-8')}', false), ('emppu', '{hashed_password.decode('utf-8')}', false)" db_run(sql)