fix argument order
This commit is contained in:
parent
43653cb84d
commit
36d55db4fc
1 changed files with 9 additions and 6 deletions
|
|
@ -43,19 +43,22 @@ async def lndhub_auth(
|
||||||
)
|
)
|
||||||
return {"refresh_token": token, "access_token": token}
|
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")
|
@lndhub_ext.post("/ext/addinvoice")
|
||||||
async def lndhub_addinvoice(
|
async def lndhub_addinvoice(
|
||||||
wallet: WalletTypeInfo = Depends(get_key_type),
|
data: AddInvoice,
|
||||||
amt: str = Query(None),
|
wallet: WalletTypeInfo = Depends(get_key_type)
|
||||||
memo: str = Query(None),
|
|
||||||
preimage: str = Query(None),
|
|
||||||
):
|
):
|
||||||
try:
|
try:
|
||||||
_, pr = await create_invoice(
|
_, pr = await create_invoice(
|
||||||
wallet_id=wallet.wallet.id,
|
wallet_id=wallet.wallet.id,
|
||||||
amount=int(amt),
|
amount=int(data.amt),
|
||||||
memo=memo,
|
memo=data.memo,
|
||||||
extra={"tag": "lndhub"},
|
extra={"tag": "lndhub"},
|
||||||
)
|
)
|
||||||
except:
|
except:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue