chore: remove pending macaroon mentions

This commit is contained in:
Eneko Illarramendi 2020-04-21 23:22:01 +02:00
parent e1c5e970c4
commit fd4dc6c48f
8 changed files with 34 additions and 34 deletions

View file

@ -15,7 +15,7 @@
<h5 class="text-caption q-mt-sm q-mb-none">Returns 201 CREATED (application/json)</h5> <h5 class="text-caption q-mt-sm q-mb-none">Returns 201 CREATED (application/json)</h5>
<code>{"checking_id": &lt;string&gt;, "payment_request": &lt;string&gt;}</code> <code>{"checking_id": &lt;string&gt;, "payment_request": &lt;string&gt;}</code>
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5> <h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
<code>curl -X POST http://127.0.0.1:5000/api/v1/payments -d '{"out": false, "amount": &lt;int&gt;, "memo": &lt;string&gt;}' -H "Grpc-Metadata-macaroon: <i>{{ wallet.inkey }}</i>" -H "Content-type: application/json"</code> <code>curl -X POST http://127.0.0.1:5000/api/v1/payments -d '{"out": false, "amount": &lt;int&gt;, "memo": &lt;string&gt;}' -H "X-Api-Key: <i>{{ wallet.inkey }}</i>" -H "Content-type: application/json"</code>
</q-card-section> </q-card-section>
</q-card> </q-card>
</q-expansion-item> </q-expansion-item>
@ -30,7 +30,7 @@
<h5 class="text-caption q-mt-sm q-mb-none">Returns 201 CREATED (application/json)</h5> <h5 class="text-caption q-mt-sm q-mb-none">Returns 201 CREATED (application/json)</h5>
<code>{"checking_id": &lt;string&gt;}</code> <code>{"checking_id": &lt;string&gt;}</code>
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5> <h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
<code>curl -X POST http://127.0.0.1:5000/api/v1/payments -d '{"out": true, "bolt11": &lt;string&gt;}' -H "Grpc-Metadata-macaroon: {{ wallet.adminkey }}"</i> -H "Content-type: application/json"</code> <code>curl -X POST http://127.0.0.1:5000/api/v1/payments -d '{"out": true, "bolt11": &lt;string&gt;}' -H "X-Api-Key: {{ wallet.adminkey }}"</i> -H "Content-type: application/json"</code>
</q-card-section> </q-card-section>
</q-card> </q-card>
</q-expansion-item> </q-expansion-item>
@ -44,7 +44,7 @@
<h5 class="text-caption q-mt-sm q-mb-none">Returns 200 OK (application/json)</h5> <h5 class="text-caption q-mt-sm q-mb-none">Returns 200 OK (application/json)</h5>
<code>{"paid": &lt;bool&gt;}</code> <code>{"paid": &lt;bool&gt;}</code>
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5> <h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
<code>curl -X GET http://127.0.0.1:5000/api/v1/payments/&lt;checking_id&gt; -H "Grpc-Metadata-macaroon: {{ wallet.inkey }}"</i> -H "Content-type: application/json"</code> <code>curl -X GET http://127.0.0.1:5000/api/v1/payments/&lt;checking_id&gt; -H "X-Api-Key: {{ wallet.inkey }}"</i> -H "Content-type: application/json"</code>
</q-card-section> </q-card-section>
</q-card> </q-card>
</q-expansion-item> </q-expansion-item>

View file

@ -8,4 +8,4 @@ Try to include an image
<h2>If your extension has API endpoints, include useful ones here</h2> <h2>If your extension has API endpoints, include useful ones here</h2>
<code>curl -H "Content-type: application/json" -X POST https://YOUR-LNBITS/YOUR-EXTENSION/api/v1/EXAMPLE -d '{"amount":"100","memo":"example"}' -H "Grpc-Metadata-macaroon: YOUR_WALLET-ADMIN/INVOICE-KEY"</code> <code>curl -H "Content-type: application/json" -X POST https://YOUR-LNBITS/YOUR-EXTENSION/api/v1/EXAMPLE -d '{"amount":"100","memo":"example"}' -H "X-Api-Key: YOUR_WALLET-ADMIN/INVOICE-KEY"</code>

View file

@ -497,7 +497,7 @@ function postAjax(url, data, thekey, success) {
success(xhr.responseText) success(xhr.responseText)
} }
} }
xhr.setRequestHeader('Grpc-Metadata-macaroon', thekey) xhr.setRequestHeader('X-Api-Key', thekey)
xhr.setRequestHeader('Content-Type', 'application/json') xhr.setRequestHeader('Content-Type', 'application/json')
xhr.send(params) xhr.send(params)
return xhr return xhr
@ -513,7 +513,7 @@ function postAjax(url, data, thekey, success) {
success(xhr.responseText) success(xhr.responseText)
} }
} }
xhr.setRequestHeader('Grpc-Metadata-macaroon', thekey) xhr.setRequestHeader('X-Api-Key', thekey)
xhr.setRequestHeader('Content-Type', 'application/json') xhr.setRequestHeader('Content-Type', 'application/json')
xhr.send() xhr.send()

View file

@ -578,7 +578,7 @@ function postAjax(url, data, thekey, success) {
success(xhr.responseText) success(xhr.responseText)
} }
} }
xhr.setRequestHeader('Grpc-Metadata-macaroon', thekey) xhr.setRequestHeader('X-Api-Key', thekey)
xhr.setRequestHeader('Content-Type', 'application/json') xhr.setRequestHeader('Content-Type', 'application/json')
xhr.send(params) xhr.send(params)
return xhr return xhr
@ -594,7 +594,7 @@ function postAjax(url, data, thekey, success) {
success(xhr.responseText) success(xhr.responseText)
} }
} }
xhr.setRequestHeader('Grpc-Metadata-macaroon', thekey) xhr.setRequestHeader('X-Api-Key', thekey)
xhr.setRequestHeader('Content-Type', 'application/json') xhr.setRequestHeader('Content-Type', 'application/json')
xhr.send() xhr.send()

View file

@ -21,7 +21,7 @@ def api_getticket():
user_ev = events_ext_db.fetchall("SELECT * FROM events WHERE unireg = ?", (unireg,)) user_ev = events_ext_db.fetchall("SELECT * FROM events WHERE unireg = ?", (unireg,))
header = {"Content-Type": "application/json", "Grpc-Metadata-macaroon": user_ev[0][4]} header = {"Content-Type": "application/json", "X-Api-Key": user_ev[0][4]}
data = {"value": str(user_ev[0][10]), "memo": user_ev[0][6]} data = {"value": str(user_ev[0][10]), "memo": user_ev[0][6]}
print(url_for("api_invoices", _external=True)) print(url_for("api_invoices", _external=True))
r = requests.post(url=url_for("api_invoices", _external=True), headers=header, data=json.dumps(data)) r = requests.post(url=url_for("api_invoices", _external=True), headers=header, data=json.dumps(data))

View file

@ -8,4 +8,4 @@ Try to include an image
<h2>If your extension has API endpoints, include useful ones here</h2> <h2>If your extension has API endpoints, include useful ones here</h2>
<code>curl -H "Content-type: application/json" -X POST https://YOUR-LNBITS/YOUR-EXTENSION/api/v1/EXAMPLE -d '{"amount":"100","memo":"example"}' -H "Grpc-Metadata-macaroon: YOUR_WALLET-ADMIN/INVOICE-KEY"</code> <code>curl -H "Content-type: application/json" -X POST https://YOUR-LNBITS/YOUR-EXTENSION/api/v1/EXAMPLE -d '{"amount":"100","memo":"example"}' -H "X-Api-Key: YOUR_WALLET-ADMIN/INVOICE-KEY"</code>

View file

@ -8,4 +8,4 @@ Try to include an image
<h2>If your extension has API endpoints, include useful ones here</h2> <h2>If your extension has API endpoints, include useful ones here</h2>
<code>curl -H "Content-type: application/json" -X POST https://YOUR-LNBITS/YOUR-EXTENSION/api/v1/EXAMPLE -d '{"amount":"100","memo":"example"}' -H "Grpc-Metadata-macaroon: YOUR_WALLET-ADMIN/INVOICE-KEY"</code> <code>curl -H "Content-type: application/json" -X POST https://YOUR-LNBITS/YOUR-EXTENSION/api/v1/EXAMPLE -d '{"amount":"100","memo":"example"}' -H "X-Api-Key: YOUR_WALLET-ADMIN/INVOICE-KEY"</code>

View file

@ -11,4 +11,4 @@ With this extension to can create/edit LNURL withdraws, set a min/max amount, se
## API endpoint - /withdraw/api/v1/lnurlmaker ## API endpoint - /withdraw/api/v1/lnurlmaker
Easily fetch one-off LNURLw Easily fetch one-off LNURLw
curl -H "Content-type: application/json" -X POST https://YOUR-LNBITS/withdraw/api/v1/lnurlmaker -d '{"amount":"100","memo":"ATM"}' -H "Grpc-Metadata-macaroon: YOUR-WALLET-ADMIN-KEY" curl -H "Content-type: application/json" -X POST https://YOUR-LNBITS/withdraw/api/v1/lnurlmaker -d '{"amount":"100","memo":"ATM"}' -H "X-Api-Key: YOUR-WALLET-ADMIN-KEY"