- ID: {{ qrCodeDialog.data.id }}
-
JSON list of users
JSON list of users
+ {"id": <string>, "name": <string>, "admin":
+ <string>, "email": <string>, "password": <string>}
+
curl -X GET {{ request.base_url
@@ -81,7 +86,7 @@
{"X-Api-Key": <string>}
Body (application/json)
- Returns 201 CREATED (application/json)
+ Returns 200 OK (application/json)
JSON wallet data
Curl example
@@ -104,7 +109,7 @@
{"X-Api-Key": <string>}
Body (application/json)
- Returns 201 CREATED (application/json)
+ Returns 200 OK (application/json)
JSON a wallets transactions
Curl example
@@ -254,11 +259,15 @@
{"X-Api-Key": <string>}
Curl example
curl -X POST {{ request.base_url }}usermanager/api/v1/extensions -d
- '{"userid": <string>, "extension": <string>, "active":
- <integer>}' -H "X-Api-Key: {{ user.wallets[0].inkey }}" -H
+ >curl -X POST {{ request.base_url }}usermanager/api/v1/extensions?extension=withdraw&userid=user_id&active=true -H "X-Api-Key: {{ user.wallets[0].inkey }}" -H
"Content-type: application/json"
+
+ Returns 200 OK (application/json)
+
+ {"extension": "updated"}
diff --git a/lnbits/extensions/withdraw/lnurl.py b/lnbits/extensions/withdraw/lnurl.py
index 18a99599c..660e5b7dd 100644
--- a/lnbits/extensions/withdraw/lnurl.py
+++ b/lnbits/extensions/withdraw/lnurl.py
@@ -78,34 +78,35 @@ async def api_lnurl_callback(
return {"status": "ERROR", "reason": f"Wait {link.open_time - now} seconds."}
usescsv = ""
+
+ for x in range(1, link.uses - link.used):
+ usecv = link.usescsv.split(",")
+ usescsv += "," + str(usecv[x])
+ usecsvback = usescsv
+
+ found = False
+ if id_unique_hash is not None:
+ useslist = link.usescsv.split(",")
+ for ind, x in enumerate(useslist):
+ tohash = link.id + link.unique_hash + str(x)
+ if id_unique_hash == shortuuid.uuid(name=tohash):
+ found = True
+ useslist.pop(ind)
+ usescsv = ",".join(useslist)
+ if not found:
+ raise HTTPException(
+ status_code=HTTPStatus.NOT_FOUND, detail="LNURL-withdraw not found."
+ )
+ else:
+ usescsv = usescsv[1:]
+
+ changesback = {
+ "open_time": link.wait_time,
+ "used": link.used,
+ "usescsv": usecsvback,
+ }
+
try:
- for x in range(1, link.uses - link.used):
- usecv = link.usescsv.split(",")
- usescsv += "," + str(usecv[x])
- usecsvback = usescsv
-
- found = False
- if id_unique_hash is not None:
- useslist = link.usescsv.split(",")
- for ind, x in enumerate(useslist):
- tohash = link.id + link.unique_hash + str(x)
- if id_unique_hash == shortuuid.uuid(name=tohash):
- found = True
- useslist.pop(ind)
- usescsv = ",".join(useslist)
- if not found:
- raise HTTPException(
- status_code=HTTPStatus.NOT_FOUND, detail="LNURL-withdraw not found."
- )
- else:
- usescsv = usescsv[1:]
-
- changesback = {
- "open_time": link.wait_time,
- "used": link.used,
- "usescsv": usecsvback,
- }
-
changes = {
"open_time": link.wait_time + now,
"used": link.used + 1,