Copilot loads

This commit is contained in:
Ben Arc 2021-10-12 23:26:01 +01:00
parent 1bd08d3a44
commit a0be1a5017
3 changed files with 15 additions and 17 deletions

View file

@ -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 }}"
</code>
</q-card-section>
</q-card>
@ -63,7 +63,7 @@
"animation": &lt;string&gt;, "show_message":&lt;string&gt;,
"amount": &lt;integer&gt;, "lnurl_title": &lt;string&gt;}' -H
"Content-type: application/json" -H "X-Api-Key:
{{g.user.wallets[0].adminkey }}"
{{user.wallets[0].adminkey }}"
</code>
</q-card-section>
</q-card>
@ -88,7 +88,7 @@
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
<code
>curl -X GET {{ request.url_root }}api/v1/copilot/&lt;copilot_id&gt;
-H "X-Api-Key: {{ g.user.wallets[0].inkey }}"
-H "X-Api-Key: {{ user.wallets[0].inkey }}"
</code>
</q-card-section>
</q-card>
@ -111,7 +111,7 @@
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
<code
>curl -X GET {{ request.url_root }}api/v1/copilots -H "X-Api-Key: {{
g.user.wallets[0].inkey }}"
user.wallets[0].inkey }}"
</code>
</q-card-section>
</q-card>
@ -137,7 +137,7 @@
<code
>curl -X DELETE {{ request.url_root
}}api/v1/copilot/&lt;copilot_id&gt; -H "X-Api-Key: {{
g.user.wallets[0].adminkey }}"
user.wallets[0].adminkey }}"
</code>
</q-card-section>
</q-card>
@ -163,7 +163,7 @@
<code
>curl -X GET {{ request.url_root }}/api/v1/copilot/ws/&lt;string,
copilot_id&gt;/&lt;string, comment&gt;/&lt;string, gif name&gt; -H
"X-Api-Key: {{ g.user.wallets[0].adminkey }}"
"X-Api-Key: {{ user.wallets[0].adminkey }}"
</code>
</q-card-section>
</q-card>

View file

@ -1,5 +1,6 @@
{% extends "base.html" %} {% from "macros.jinja" import window_vars with context
%} {% block page %}
<div class="row q-col-gutter-md">
<div class="col-12 col-md-7 q-gutter-y-md">
<q-card>
@ -384,8 +385,6 @@
</q-dialog>
</div>
{% endblock %} {% block scripts %} {{ window_vars(user) }}
<script src="{{ url_for('static', filename='vendor/vue-qrcode@1.0.2/vue-qrcode.min.js') }}"></script>
<style></style>
<script>
Vue.component(VueQrcode.name, VueQrcode)
@ -533,7 +532,7 @@
this.g.user.wallets[0].inkey
)
.then(function (response) {
if(response.data){
if (response.data) {
self.CopilotLinks = response.data.map(mapCopilot)
}
})
@ -634,7 +633,7 @@
LNbits.utils.notifyApiError(error)
})
},
clearFormDialogCopilot(){
clearFormDialogCopilot() {
this.formDialogCopilot.data = {
lnurl_toggle: false,
show_message: false,

View file

@ -19,7 +19,6 @@ from starlette.responses import HTMLResponse, JSONResponse # type: ignore
from lnbits.core.models import User
import base64
templates = Jinja2Templates(directory="templates")