Created delete.py

This commit is contained in:
StNicolay 2022-10-05 15:01:34 +03:00
parent 289532fd95
commit 4753d91ba4

15
src/database/delete.py Normal file
View 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()