fix: delete account

This commit is contained in:
Vlad Stan 2023-04-06 16:59:15 +03:00
parent f7fb926c52
commit f19fb4a18e
4 changed files with 85 additions and 4 deletions

10
crud.py
View file

@ -363,6 +363,16 @@ async def update_account(relay_id: str, a: NostrAccount) -> NostrAccount:
return a
async def delete_account(relay_id: str, pubkey: str):
await db.execute(
"""
DELETE FROM nostrrelay.accounts
WHERE relay_id = ? AND pubkey = ?
""",
(relay_id, pubkey),
)
async def get_account(
relay_id: str,
pubkey: str,