@@ -485,19 +491,17 @@
sendFormDataCopilot: function () {
var self = this
console.log(self.formDialogCopilot.data.animation1threshold)
- if(self.formDialogCopilot.data.id){
+ if (self.formDialogCopilot.data.id) {
this.updateCopilot(
- self.g.user.wallets[0].adminkey,
- self.formDialogCopilot.data
- )
- }
- else{
+ self.g.user.wallets[0].adminkey,
+ self.formDialogCopilot.data
+ )
+ } else {
this.createCopilot(
- self.g.user.wallets[0].adminkey,
- self.formDialogCopilot.data
- )
+ self.g.user.wallets[0].adminkey,
+ self.formDialogCopilot.data
+ )
}
-
},
createCopilot: function (wallet, data) {
@@ -588,14 +592,19 @@
var updatedData = {}
console.log(data)
for (const property in data) {
- if(data[property]){
+ if (data[property]) {
updatedData[property] = data[property]
}
}
console.log(updatedData)
LNbits.api
- .request('PUT', '/copilot/api/v1/copilot/' + updatedData.id, wallet, updatedData)
+ .request(
+ 'PUT',
+ '/copilot/api/v1/copilot/' + updatedData.id,
+ wallet,
+ updatedData
+ )
.then(function (response) {
self.CopilotLinks.push(mapCopilot(response.data))
self.formDialogCopilot.show = false
diff --git a/lnbits/extensions/copilot/templates/copilot/panel.html b/lnbits/extensions/copilot/templates/copilot/panel.html
index 1cf74b40..4f29c205 100644
--- a/lnbits/extensions/copilot/templates/copilot/panel.html
+++ b/lnbits/extensions/copilot/templates/copilot/panel.html
@@ -129,7 +129,8 @@
LNbits.api
.request(
'GET',
- '/copilot/api/v1/copilot/ws/' + self.copilot.id + '/none/' + name)
+ '/copilot/api/v1/copilot/ws/' + self.copilot.id + '/none/' + name
+ )
.then(function (response1) {
self.$q.notify({
color: 'green',
@@ -139,7 +140,7 @@
.catch(err => {
LNbits.utils.notifyApiError(err)
})
- },
+ }
},
created: function () {
self = this
diff --git a/package-lock.json b/package-lock.json
index e08f5cc4..3d073542 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,11 +1,31 @@
{
+ "name": "lnbits",
+ "lockfileVersion": 2,
"requires": true,
- "lockfileVersion": 1,
+ "packages": {
+ "": {
+ "devDependencies": {
+ "prettier": "2.1.1"
+ }
+ },
+ "node_modules/prettier": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.1.1.tgz",
+ "integrity": "sha512-9bY+5ZWCfqj3ghYBLxApy2zf6m+NJo5GzmLTpr9FsApsfjriNnS2dahWReHMi7qNPhhHl9SYHJs2cHZLgexNIw==",
+ "dev": true,
+ "bin": {
+ "prettier": "bin-prettier.js"
+ },
+ "engines": {
+ "node": ">=10.13.0"
+ }
+ }
+ },
"dependencies": {
"prettier": {
- "version": "2.0.5",
- "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.0.5.tgz",
- "integrity": "sha512-7PtVymN48hGcO4fGjybyBSIWDsLU4H4XlvOHfq91pz9kkGlonzwTfYkaIEwiRg/dAJF9YlbsduBAgtYLi+8cFg==",
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.1.1.tgz",
+ "integrity": "sha512-9bY+5ZWCfqj3ghYBLxApy2zf6m+NJo5GzmLTpr9FsApsfjriNnS2dahWReHMi7qNPhhHl9SYHJs2cHZLgexNIw==",
"dev": true
}
}