mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2025-03-04 09:58:33 +01:00
fix: send payments via Wallet UI
This commit is contained in:
parent
63d0242685
commit
9e76668269
1 changed files with 2 additions and 2 deletions
|
@ -31,7 +31,7 @@ from ..tasks import api_invoice_listeners
|
|||
|
||||
@core_app.get("/api/v1/wallet")
|
||||
async def api_wallet(wallet: WalletTypeInfo = Depends(get_key_type)):
|
||||
return {"id": wallet.wallet.id, "name": wallet.wallet.name, "balance": wallet.wallet.balance_msat},
|
||||
return {"id": wallet.wallet.id, "name": wallet.wallet.name, "balance": wallet.wallet.balance_msat}
|
||||
|
||||
|
||||
@core_app.put("/api/v1/wallet/{new_name}")
|
||||
|
@ -171,7 +171,7 @@ async def api_payments_pay_invoice(bolt11: str, wallet: Wallet):
|
|||
status_code=HTTPStatus.CREATED)
|
||||
async def api_payments_create(wallet: WalletTypeInfo = Depends(get_key_type), out: bool = True,
|
||||
invoiceData: Optional[CreateInvoiceData] = Body(None),
|
||||
bolt11: Optional[str] = Query(None)):
|
||||
bolt11: Optional[str] = Body(None)):
|
||||
|
||||
if wallet.wallet_type < 0 or wallet.wallet_type > 2:
|
||||
raise HTTPException(status_code=HTTPStatus.BAD_REQUEST, detail="Key is invalid")
|
||||
|
|
Loading…
Add table
Reference in a new issue