|
@ -13,7 +13,7 @@ from lnbits.extensions.withdraw import withdraw_ext |
|
|
@withdraw_ext.route("/api/v1/lnurlencode/<urlstr>/<parstr>", methods=["GET"]) |
|
|
@withdraw_ext.route("/api/v1/lnurlencode/<urlstr>/<parstr>", methods=["GET"]) |
|
|
def api_lnurlencode(urlstr, parstr): |
|
|
def api_lnurlencode(urlstr, parstr): |
|
|
"""Returns encoded LNURL if web url and parameter gieven.""" |
|
|
"""Returns encoded LNURL if web url and parameter gieven.""" |
|
|
print(urlstr) |
|
|
|
|
|
if not urlstr: |
|
|
if not urlstr: |
|
|
return jsonify({"status": "FALSE"}), 200 |
|
|
return jsonify({"status": "FALSE"}), 200 |
|
|
|
|
|
|
|
@ -27,7 +27,7 @@ def api_lnurlencode(urlstr, parstr): |
|
|
rand = randar[user_fau[0][10] - 1] |
|
|
rand = randar[user_fau[0][10] - 1] |
|
|
else: |
|
|
else: |
|
|
rand = randar[0] |
|
|
rand = randar[0] |
|
|
print(rand) |
|
|
|
|
|
|
|
|
|
|
|
url = url_for("withdraw.api_lnurlfetch", _external=True, urlstr=urlstr, parstr=parstr, rand=rand) |
|
|
url = url_for("withdraw.api_lnurlfetch", _external=True, urlstr=urlstr, parstr=parstr, rand=rand) |
|
|
|
|
|
|
|
@ -57,7 +57,7 @@ def api_lnurlfetch(parstr, urlstr, rand): |
|
|
max_withdrawable=user_fau[0][7] * 1000, |
|
|
max_withdrawable=user_fau[0][7] * 1000, |
|
|
default_description="LNbits LNURL withdraw", |
|
|
default_description="LNbits LNURL withdraw", |
|
|
) |
|
|
) |
|
|
print(res.json()) |
|
|
|
|
|
|
|
|
|
|
|
return res.json(), 200 |
|
|
return res.json(), 200 |
|
|
|
|
|
|
|
|