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:
parent
07a07fc079
commit
3c45acc4d5
4 changed files with 9 additions and 7 deletions
7
crud.py
7
crud.py
|
|
@ -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]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue