copy changes

more copy
clean debugging... prints! lol
clean console logs
fix get users

Only get users that explicitly have been allowed or blocked
UI
UI-2
prevent getting all accounts (false, false is default)
remove client side filtering


remove prints
This commit is contained in:
Tiago Vasconcelos 2023-07-17 10:49:03 +01:00 committed by Vlad Stan
parent 07a07fc079
commit 3c45acc4d5
4 changed files with 9 additions and 7 deletions

View file

@ -391,9 +391,12 @@ async def get_accounts(
allowed=True,
blocked=False,
) -> List[NostrAccount]:
if not allowed and not blocked:
return []
rows = await db.fetchall(
"SELECT * FROM nostrrelay.accounts WHERE relay_id = ? AND allowed = ? AND blocked = ?",
"SELECT * FROM nostrrelay.accounts WHERE relay_id = ? AND allowed = ? OR blocked = ?",
(relay_id, allowed, blocked),
)
return [NostrAccount.from_row(row) for row in rows]