mirror of
https://github.com/lnbits/lnbits.git
synced 2025-09-26 20:06:17 +02:00
Merge pull request #385 from arcbtc/FastAPI
restored create invoice api endpoint
This commit is contained in:
@@ -9,6 +9,7 @@ from starlette.responses import HTMLResponse
|
||||
from lnbits.decorators import check_user_exists
|
||||
from lnbits.core.models import Payment, User
|
||||
from lnbits.core.crud import get_standalone_payment
|
||||
from lnbits.core.views.api import api_payment
|
||||
|
||||
from . import offlineshop_ext, offlineshop_renderer
|
||||
from .models import Item
|
||||
@@ -51,6 +52,7 @@ async def confirmation_code(p: str = Query(...)):
|
||||
style = "<style>* { font-size: 100px}</style>"
|
||||
|
||||
payment_hash = p
|
||||
await api_payment(payment_hash)
|
||||
payment: Payment = await get_standalone_payment(payment_hash)
|
||||
if not payment:
|
||||
raise HTTPException(
|
||||
|
Reference in New Issue
Block a user