Added lnurl helper, and I hate mypy
This commit is contained in:
parent
a8e05612da
commit
5a2ba743cf
7 changed files with 275 additions and 286 deletions
4
crud.py
4
crud.py
|
|
@ -1,6 +1,9 @@
|
|||
# Description: This file contains the CRUD operations for talking to the database.
|
||||
|
||||
from typing import List, Optional, Union
|
||||
|
||||
from lnbits.db import Database
|
||||
from loguru import logger
|
||||
|
||||
from .models import MyExtension
|
||||
|
||||
|
|
@ -24,6 +27,7 @@ async def get_myextensions(wallet_ids: Union[str, List[str]]) -> List[MyExtensio
|
|||
if isinstance(wallet_ids, str):
|
||||
wallet_ids = [wallet_ids]
|
||||
q = ",".join([f"'{w}'" for w in wallet_ids])
|
||||
logger.debug(q)
|
||||
return await db.fetchall(
|
||||
f"SELECT * FROM myextension.maintable WHERE wallet IN ({q}) ORDER BY id",
|
||||
model=MyExtension,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue