Completed add_master pass function
This commit is contained in:
		@@ -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(
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user