mirror of
https://github.com/lnbits/lnbits.git
synced 2025-04-22 14:34:27 +02:00
Merge pull request #373 from arcbtc/FastAPI
restored create invoice api endpoint
This commit is contained in:
commit
b4ed58d4e9
@ -329,7 +329,9 @@ async def api_payment(payment_hash):
|
||||
await check_invoice_status(payment.wallet_id, payment_hash)
|
||||
payment = await get_standalone_payment(payment_hash)
|
||||
if not payment:
|
||||
return {"message": "Payment does not exist."}
|
||||
raise HTTPException(
|
||||
status_code=HTTPStatus.NOT_FOUND, detail="Payment does not exist."
|
||||
)
|
||||
elif not payment.pending:
|
||||
return {"paid": True, "preimage": payment.preimage}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user