From 4d5d3388d2360396ab4fbc67473a938418613be7 Mon Sep 17 00:00:00 2001 From: Arc Date: Tue, 1 Oct 2024 19:50:25 +0100 Subject: [PATCH] removed timestamp from models --- crud.py | 6 ++++-- models.py | 2 -- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/crud.py b/crud.py index 202f0c8..3c22ecc 100644 --- a/crud.py +++ b/crud.py @@ -130,7 +130,7 @@ async def get_lnurldevice(lnurldevice_id: str, req: Request) -> Optional[Lnurlde async def get_lnurldevices(wallet_ids: List[str], req: Request) -> List[Lnurldevice]: - + q = ",".join(["?"] * len(wallet_ids)) rows = await db.fetchall( f""" @@ -216,7 +216,9 @@ async def get_lnurldevicepayment( async def get_lnurldevicepayments( lnurldevice_ids: List[str], -) -> List[LnurldevicePayment]: +) -> Optional[List[LnurldevicePayment]]: + if not lnurldevice_ids: + return [] q = ",".join(["?"] * len(lnurldevice_ids)) rows = await db.fetchall( f""" diff --git a/models.py b/models.py index ff6d6ab..b280a7a 100644 --- a/models.py +++ b/models.py @@ -32,7 +32,6 @@ class Lnurldevice(BaseModel): currency: str device: str extra: Optional[Union[Json[List[LnurldeviceExtra]], str]] - timestamp: str @property def lnurlpay_metadata(self) -> LnurlPayMetadata: @@ -46,7 +45,6 @@ class LnurldevicePayment(BaseModel): payload: str pin: int sats: int - timestamp: str class Lnurlencode(BaseModel):