mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2025-03-13 11:35:56 +01:00
Stopped 0 invoice creation in tickets
This commit is contained in:
parent
435b4056fd
commit
ffba97850b
1 changed files with 4 additions and 0 deletions
|
@ -103,6 +103,10 @@ async def api_ticket_make_ticket(data: CreateTicketData, form_id):
|
|||
raise HTTPException(
|
||||
status_code=HTTPStatus.NOT_FOUND, detail=f"LNTicket does not exist."
|
||||
)
|
||||
if data.sats < 1:
|
||||
raise HTTPException(
|
||||
status_code=HTTPStatus.NOT_FOUND, detail=f"0 invoices not allowed."
|
||||
)
|
||||
|
||||
nwords = len(re.split(r"\s+", data.ltext))
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue