chore: code format

This commit is contained in:
Vlad Stan
2022-12-16 10:29:53 +02:00
parent 4ee68628cc
commit d6757ed2cf

View File

@@ -259,31 +259,31 @@ new Vue({
this.parse.camera.show = false this.parse.camera.show = false
}, },
updateBalance: function (credit) { updateBalance: function (credit) {
LNbits.api LNbits.api
.request( .request(
'PUT', 'PUT',
'/admin/api/v1/topup/?usr=' + this.g.user.id, '/admin/api/v1/topup/?usr=' + this.g.user.id,
this.g.user.wallets[0].adminkey, this.g.user.wallets[0].adminkey,
{ {
amount: credit, amount: credit,
id: this.g.user.wallets[0].id id: this.g.user.wallets[0].id
} }
) )
.then(response => { .then(response => {
this.$q.notify({ this.$q.notify({
type: 'positive', type: 'positive',
message: message:
'Success! Added ' + 'Success! Added ' +
credit + credit +
' sats to ' + ' sats to ' +
this.g.user.wallets[0].id, this.g.user.wallets[0].id,
icon: null icon: null
});
this.balance += parseInt(credit);
}) })
.catch(function (error) { this.balance += parseInt(credit)
LNbits.utils.notifyApiError(error) })
}); .catch(function (error) {
LNbits.utils.notifyApiError(error)
})
}, },
closeReceiveDialog: function () { closeReceiveDialog: function () {
setTimeout(() => { setTimeout(() => {