Changed webhook to actually optional
This commit is contained in:
parent
1359c1ee39
commit
3dd94dd710
|
@ -318,8 +318,7 @@
|
|||
formDialog: {
|
||||
show: false,
|
||||
data: {flatrate: false}
|
||||
},
|
||||
cancelListener: () => {}
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
@ -478,30 +477,12 @@
|
|||
},
|
||||
exportformsCSV: function () {
|
||||
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 () {
|
||||
if (this.g.user.wallets.length) {
|
||||
this.getTickets()
|
||||
this.getForms()
|
||||
this.startPaymentNotifier()
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
|
@ -45,7 +45,7 @@ async def api_forms():
|
|||
schema={
|
||||
"wallet": {"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},
|
||||
"amount": {"type": "integer", "min": 0, "required": True},
|
||||
"flatrate": {"type": "integer", "required": True},
|
||||
|
|
Loading…
Reference in New Issue
Block a user