feat: clean-up when relay deleted
This commit is contained in:
parent
6527d04977
commit
b098dc5d77
2 changed files with 9 additions and 1 deletions
7
crud.py
7
crud.py
|
|
@ -128,8 +128,14 @@ async def delete_events(relay_id: str, filter: NostrFilter):
|
|||
|
||||
query = f"""DELETE from nostrrelay.events WHERE {" AND ".join(where)}"""
|
||||
await db.execute(query, tuple(values))
|
||||
#todo: delete tags
|
||||
|
||||
|
||||
async def delete_all_events(relay_id: str):
|
||||
query = "DELETE from nostrrelay.events WHERE relay_id = ?"
|
||||
await db.execute(query, (relay_id,))
|
||||
# todo: delete tags
|
||||
|
||||
async def create_event_tags(
|
||||
relay_id: str, event_id: str, tag_name: str, tag_value: str, extra_values: Optional[str]
|
||||
):
|
||||
|
|
@ -147,7 +153,6 @@ async def create_event_tags(
|
|||
(relay_id, event_id, tag_name, tag_value, extra_values),
|
||||
)
|
||||
|
||||
|
||||
async def get_event_tags(
|
||||
relay_id: str, event_id: str
|
||||
) -> List[List[str]]:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue