convert to using lnbits card id instead of card uid

This commit is contained in:
Lee Salminen
2022-08-21 10:00:16 -06:00
parent a8bc3ea870
commit 971d8f34e8
2 changed files with 4 additions and 17 deletions
-12
View File
@@ -85,18 +85,6 @@ async def get_card(card_id: str) -> Optional[Card]:
return Card.parse_obj(card)
async def get_card_by_uid(card_uid: str) -> Optional[Card]:
row = await db.fetchone(
"SELECT * FROM boltcards.cards WHERE uid = ?", (card_uid.upper(),)
)
if not row:
return None
card = dict(**row)
return Card.parse_obj(card)
async def get_card_by_otp(otp: str) -> Optional[Card]:
row = await db.fetchone("SELECT * FROM boltcards.cards WHERE otp = ?", (otp,))
if not row: