From 914b9f3ffe06432eb8623905ae74d92634ae826f Mon Sep 17 00:00:00 2001 From: callebtc <93376500+callebtc@users.noreply.github.com> Date: Wed, 16 Feb 2022 22:23:26 +0100 Subject: [PATCH] allow amounts >0 --- lnbits/core/templates/core/_api_docs.html | 2 +- lnbits/core/views/api.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lnbits/core/templates/core/_api_docs.html b/lnbits/core/templates/core/_api_docs.html index c7f3f9ad..0e74f38e 100644 --- a/lnbits/core/templates/core/_api_docs.html +++ b/lnbits/core/templates/core/_api_docs.html @@ -61,7 +61,7 @@ curl -X POST {{ request.base_url }}api/v1/payments -d '{"out": false, "amount": <int>, "memo": <string>, "webhook": - <url:string>}' -H "X-Api-Key: {{ wallet.inkey }}" -H + <url:string>, "unit": <string>}' -H "X-Api-Key: {{ wallet.inkey }}" -H "Content-type: application/json" diff --git a/lnbits/core/views/api.py b/lnbits/core/views/api.py index 107a2684..a5358275 100644 --- a/lnbits/core/views/api.py +++ b/lnbits/core/views/api.py @@ -123,7 +123,7 @@ async def api_payments(wallet: WalletTypeInfo = Depends(get_key_type)): class CreateInvoiceData(BaseModel): out: Optional[bool] = True - amount: int = Query(None, ge=1) + amount: int = Query(None, ge=0) memo: str = None unit: Optional[str] = "sat" description_hash: Optional[str] = None