added commits to delete funcs
This commit is contained in:
parent
fab8e18723
commit
fae04547c8
@ -8,6 +8,7 @@ def purge_accounts(engine: Engine, user_id: int) -> None:
|
||||
statement = sqlmodel.delete(models.Account).where(models.Account.user_id == user_id)
|
||||
with sqlmodel.Session(engine) as session:
|
||||
session.exec(statement)
|
||||
session.commit()
|
||||
|
||||
|
||||
def delete_master_pass(engine: Engine, user_id: int) -> None:
|
||||
@ -16,6 +17,7 @@ def delete_master_pass(engine: Engine, user_id: int) -> None:
|
||||
)
|
||||
with sqlmodel.Session(engine) as session:
|
||||
session.exec(statement)
|
||||
session.commit()
|
||||
|
||||
|
||||
def delete_account(engine: Engine, user_id: int, name: str) -> None:
|
||||
@ -24,3 +26,4 @@ def delete_account(engine: Engine, user_id: int, name: str) -> None:
|
||||
)
|
||||
with sqlmodel.Session(engine) as session:
|
||||
session.exec(statement)
|
||||
session.commit()
|
||||
|
Reference in New Issue
Block a user