From a0be1a5017f0322f8f7a77dd3183f6283dde5010 Mon Sep 17 00:00:00 2001 From: Ben Arc Date: Tue, 12 Oct 2021 23:26:01 +0100 Subject: [PATCH] Copilot loads --- .../copilot/templates/copilot/_api_docs.html | 12 ++++++------ .../copilot/templates/copilot/index.html | 19 +++++++++---------- lnbits/extensions/copilot/views.py | 1 - 3 files changed, 15 insertions(+), 17 deletions(-) diff --git a/lnbits/extensions/copilot/templates/copilot/_api_docs.html b/lnbits/extensions/copilot/templates/copilot/_api_docs.html index d6289be9..9cbb99cb 100644 --- a/lnbits/extensions/copilot/templates/copilot/_api_docs.html +++ b/lnbits/extensions/copilot/templates/copilot/_api_docs.html @@ -35,7 +35,7 @@ <string>, "animation": <string>, "show_message":<string>, "amount": <integer>, "lnurl_title": <string>}' -H "Content-type: application/json" - -H "X-Api-Key: {{g.user.wallets[0].adminkey }}" + -H "X-Api-Key: {{user.wallets[0].adminkey }}" @@ -63,7 +63,7 @@ "animation": <string>, "show_message":<string>, "amount": <integer>, "lnurl_title": <string>}' -H "Content-type: application/json" -H "X-Api-Key: - {{g.user.wallets[0].adminkey }}" + {{user.wallets[0].adminkey }}" @@ -88,7 +88,7 @@
Curl example
curl -X GET {{ request.url_root }}api/v1/copilot/<copilot_id> - -H "X-Api-Key: {{ g.user.wallets[0].inkey }}" + -H "X-Api-Key: {{ user.wallets[0].inkey }}" @@ -111,7 +111,7 @@
Curl example
curl -X GET {{ request.url_root }}api/v1/copilots -H "X-Api-Key: {{ - g.user.wallets[0].inkey }}" + user.wallets[0].inkey }}" @@ -137,7 +137,7 @@ curl -X DELETE {{ request.url_root }}api/v1/copilot/<copilot_id> -H "X-Api-Key: {{ - g.user.wallets[0].adminkey }}" + user.wallets[0].adminkey }}" @@ -163,7 +163,7 @@ curl -X GET {{ request.url_root }}/api/v1/copilot/ws/<string, copilot_id>/<string, comment>/<string, gif name> -H - "X-Api-Key: {{ g.user.wallets[0].adminkey }}" + "X-Api-Key: {{ user.wallets[0].adminkey }}" diff --git a/lnbits/extensions/copilot/templates/copilot/index.html b/lnbits/extensions/copilot/templates/copilot/index.html index 12d7058a..c5f96fe2 100644 --- a/lnbits/extensions/copilot/templates/copilot/index.html +++ b/lnbits/extensions/copilot/templates/copilot/index.html @@ -1,5 +1,6 @@ {% extends "base.html" %} {% from "macros.jinja" import window_vars with context %} {% block page %} +
@@ -384,8 +385,6 @@
{% endblock %} {% block scripts %} {{ window_vars(user) }} - -