added NOT_FOUND to check payment endpoint, rather than OK
This commit is contained in:
parent
9630d8b363
commit
00ec6f2af3
1 changed files with 3 additions and 1 deletions
|
|
@ -329,7 +329,9 @@ 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:
|
||||||
return {"message": "Payment does not exist."}
|
raise HTTPException(
|
||||||
|
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