mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2024-11-20 10:39:59 +01:00
fix argument order
This commit is contained in:
parent
43653cb84d
commit
36d55db4fc
@ -43,19 +43,22 @@ async def lndhub_auth(
|
||||
)
|
||||
return {"refresh_token": token, "access_token": token}
|
||||
|
||||
class AddInvoice(BaseModel):
|
||||
amt: str = Query(None)
|
||||
memo: str = Query(None)
|
||||
preimage: str = Query(None)
|
||||
|
||||
|
||||
@lndhub_ext.post("/ext/addinvoice")
|
||||
async def lndhub_addinvoice(
|
||||
wallet: WalletTypeInfo = Depends(get_key_type),
|
||||
amt: str = Query(None),
|
||||
memo: str = Query(None),
|
||||
preimage: str = Query(None),
|
||||
data: AddInvoice,
|
||||
wallet: WalletTypeInfo = Depends(get_key_type)
|
||||
):
|
||||
try:
|
||||
_, pr = await create_invoice(
|
||||
wallet_id=wallet.wallet.id,
|
||||
amount=int(amt),
|
||||
memo=memo,
|
||||
amount=int(data.amt),
|
||||
memo=data.memo,
|
||||
extra={"tag": "lndhub"},
|
||||
)
|
||||
except:
|
||||
|
Loading…
Reference in New Issue
Block a user