Changed webhook to actually optional
This commit is contained in:
parent
1359c1ee39
commit
3dd94dd710
2 changed files with 2 additions and 21 deletions
|
|
@ -318,8 +318,7 @@
|
||||||
formDialog: {
|
formDialog: {
|
||||||
show: false,
|
show: false,
|
||||||
data: {flatrate: false}
|
data: {flatrate: false}
|
||||||
},
|
}
|
||||||
cancelListener: () => {}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
@ -478,30 +477,12 @@
|
||||||
},
|
},
|
||||||
exportformsCSV: function () {
|
exportformsCSV: function () {
|
||||||
LNbits.utils.exportCSV(this.formsTable.columns, this.forms)
|
LNbits.utils.exportCSV(this.formsTable.columns, this.forms)
|
||||||
},
|
|
||||||
startPaymentNotifier() {
|
|
||||||
this.cancelListener()
|
|
||||||
|
|
||||||
this.cancelListener = LNbits.events.onInvoicePaid(
|
|
||||||
this.g.user.wallets[0],
|
|
||||||
payment => {
|
|
||||||
this.getTickets()
|
|
||||||
|
|
||||||
this.$q.notify({
|
|
||||||
type: 'positive',
|
|
||||||
message: 'New ticket arrived!',
|
|
||||||
icon: 'textsms'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
created: function () {
|
created: function () {
|
||||||
if (this.g.user.wallets.length) {
|
if (this.g.user.wallets.length) {
|
||||||
this.getTickets()
|
this.getTickets()
|
||||||
this.getForms()
|
this.getForms()
|
||||||
this.startPaymentNotifier()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ async def api_forms():
|
||||||
schema={
|
schema={
|
||||||
"wallet": {"type": "string", "empty": False, "required": True},
|
"wallet": {"type": "string", "empty": False, "required": True},
|
||||||
"name": {"type": "string", "empty": False, "required": True},
|
"name": {"type": "string", "empty": False, "required": True},
|
||||||
"webhook": {"type": "string", "empty": False, "required": False},
|
"webhook": {"type": "string", "required": False},
|
||||||
"description": {"type": "string", "min": 0, "required": True},
|
"description": {"type": "string", "min": 0, "required": True},
|
||||||
"amount": {"type": "integer", "min": 0, "required": True},
|
"amount": {"type": "integer", "min": 0, "required": True},
|
||||||
"flatrate": {"type": "integer", "required": True},
|
"flatrate": {"type": "integer", "required": True},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue