Completed add_master pass function

This commit is contained in:
StNicolay 2022-10-05 14:44:03 +03:00
parent 449056d2d2
commit 7cfb97199f

View File

@ -1,8 +1,15 @@
import mariadb
def add_master_pass(hashed_passwd: bytes, salt: bytes, con: mariadb.Connection) -> bool:
...
def add_master_pass(
id: int, hashed_passwd: bytes, salt: bytes, con: mariadb.Connection
) -> bool:
cursor = con.cursor()
cursor.execute(
"INSERT INTO master_pass (user_id, salt, passwd) VALUES (?, ?, ?)",
[id, hashed_passwd, salt],
)
cursor.close()
def add_account(