Created delete.py
This commit is contained in:
parent
289532fd95
commit
4753d91ba4
15
src/database/delete.py
Normal file
15
src/database/delete.py
Normal file
@ -0,0 +1,15 @@
|
||||
import mariadb
|
||||
|
||||
|
||||
def delete_master_pass(con: mariadb.Connection, user_id: int) -> None:
|
||||
cursor = con.cursor()
|
||||
cursor.execute("DELETE FROM master_pass WHERE user_id=?", [user_id])
|
||||
cursor.close()
|
||||
|
||||
|
||||
def delete_account(con: mariadb.Connection, user_id: int, account: str):
|
||||
cursor = con.cursor()
|
||||
cursor.execute(
|
||||
"DELETE FROM accounts WHERE user_id = ? AND acc_name = ?", [user_id, account]
|
||||
)
|
||||
cursor.close()
|
Reference in New Issue
Block a user