Merge pull request #375 from arcbtc/FastAPI
restored create invoice api endpoint
This commit is contained in:
commit
4d3d4a520f
1 changed files with 1 additions and 3 deletions
|
|
@ -329,9 +329,7 @@ async def api_payment(payment_hash):
|
||||||
await check_invoice_status(payment.wallet_id, payment_hash)
|
await check_invoice_status(payment.wallet_id, payment_hash)
|
||||||
payment = await get_standalone_payment(payment_hash)
|
payment = await get_standalone_payment(payment_hash)
|
||||||
if not payment:
|
if not payment:
|
||||||
raise HTTPException(
|
return {"message": "Payment does not exist."}
|
||||||
status_code=HTTPStatus.NOT_FOUND, detail="Payment does not exist."
|
|
||||||
)
|
|
||||||
elif not payment.pending:
|
elif not payment.pending:
|
||||||
return {"paid": True, "preimage": payment.preimage}
|
return {"paid": True, "preimage": payment.preimage}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue