Added meta for api /docs

This commit is contained in:
ben 2022-07-27 18:20:36 +01:00
parent 22592d6fde
commit 58659d2f47
3 changed files with 24 additions and 12 deletions

View File

@ -45,7 +45,14 @@ def create_app(config_object="lnbits.settings") -> FastAPI:
"""
configure_logger()
app = FastAPI()
app = FastAPI(
title="LNbits API",
description="API for LNbits, the free and open source bitcoin wallet and accounts system with plugins.",
license_info={
"name": "MIT License",
"url": "https://raw.githubusercontent.com/lnbits/lnbits-legend/main/LICENSE",
},
)
app.mount("/static", StaticFiles(packages=[("lnbits", "static")]), name="static")
app.mount(
"/core/static",

View File

@ -135,9 +135,7 @@
var self = this
axios
.get(
'/events/api/v1/tickets/' + '{{ event_id }}'
)
.get('/events/api/v1/tickets/' + '{{ event_id }}')
.then(function (response) {
self.paymentReq = response.data.payment_request
self.paymentCheck = response.data.payment_hash
@ -155,13 +153,17 @@
paymentChecker = setInterval(function () {
axios
.post('/events/api/v1/tickets/' + '{{ event_id }}/' + self.paymentCheck,
{
event: '{{ event_id }}',
event_name: '{{ event_name }}',
name: self.formDialog.data.name,
email: self.formDialog.data.email
})
.post(
'/events/api/v1/tickets/' +
'{{ event_id }}/' +
self.paymentCheck,
{
event: '{{ event_id }}',
event_name: '{{ event_name }}',
name: self.formDialog.data.name,
email: self.formDialog.data.email
}
)
.then(function (res) {
if (res.data.paid) {
clearInterval(paymentChecker)

View File

@ -133,7 +133,10 @@
var self = this
LNbits.api
.request('GET', '/events/api/v1/register/ticket/' + res.split("//")[1])
.request(
'GET',
'/events/api/v1/register/ticket/' + res.split('//')[1]
)
.then(function (response) {
self.$q.notify({
type: 'positive',