This commit is contained in:
Ben Arc 2021-04-16 22:07:06 +01:00
parent 88e11b4793
commit 1349f74c45
2 changed files with 3 additions and 2 deletions

View File

@ -77,5 +77,5 @@ async def lnurl_callback(cp_id):
disposable=False,
routes=[],
)
print(payment_request)
print(url_for("copilot.api_copilot_hooker", copilot_id=cp_id, amount=int(amount_received / 1000), _external=False))
return jsonify(resp.dict())

View File

@ -64,8 +64,9 @@ async def panel(copilot_id):
return await render_template("copilot/panel.html", copilot=copilot)
@copilot_ext.route("/api/v1/copilot/hook/<copilot_id>/<amount>", methods=["GET"])
@copilot_ext.route("/api/v1/copilot/hook/<copilot_id>/<amount>/", methods=["GET"])
async def api_copilot_hooker(copilot_id, amount):
print("amount")
copilot = await get_copilot(copilot_id)
print("amount")
if not copilot: