fix: use lnbits linting, change to uv (#9)
Some checks failed
/ release (push) Has been cancelled
Tests / test (push) Has been cancelled
/ pullrequest (push) Has been cancelled

* fix: use lnbits linting, change to uv

- formatting
- prettier
- pyright

* dont ignore packagejson

* readd poetry lock for integration tests

* fix pyright

* fix mypy

* fix test?

* fix lnbits version

* fixup tests

* fixup!
This commit is contained in:
dni ⚡ 2025-09-12 09:30:16 +02:00 • committed by GitHub
commit 603b345073
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
28 changed files with 5059 additions and 2199 deletions

View file

@ -1,87 +1,87 @@
window.app = Vue.createApp({
el: "#vue",
el: '#vue',
mixins: [windowMixin],
delimiters: ["${", "}"],
delimiters: ['${', '}'],
data: function () {
return {
entries: [],
columns: [
{
name: "key",
name: 'key',
required: true,
label: "Key",
align: "left",
field: (row) => row.key,
sortable: true,
label: 'Key',
align: 'left',
field: row => row.key,
sortable: true
},
{
name: "value",
name: 'value',
required: true,
label: "Value",
align: "left",
field: (row) => row.value,
sortable: true,
},
],
};
label: 'Value',
align: 'left',
field: row => row.value,
sortable: true
}
]
}
},
methods: {
fetchConfig() {
this.entries = [];
this.entries = []
LNbits.api
.request(
"GET",
"/nwcprovider/api/v1/config",
this.g.user.wallets[0].adminkey,
'GET',
'/nwcprovider/api/v1/config',
this.g.user.wallets[0].adminkey
)
.then((response) => {
const newEntries = [];
.then(response => {
const newEntries = []
for (const [key, value] of Object.entries(response.data)) {
newEntries.push({
key: key,
value: value,
});
value: value
})
}
this.entries.length = 0;
this.entries.push(...newEntries);
this.entries.length = 0
this.entries.push(...newEntries)
})
.catch(function (error) {
console.error("Error fetching config:", error);
});
console.error('Error fetching config:', error)
})
},
async saveConfig() {
const data = {};
const data = {}
for (const entry of this.entries) {
data[entry.key] = entry.value;
data[entry.key] = entry.value
}
try {
const response = await LNbits.api.request(
"POST",
"/nwcprovider/api/v1/config",
'POST',
'/nwcprovider/api/v1/config',
this.g.user.wallets[0].adminkey,
data,
);
data
)
Quasar.Notify.create({
type: "positive",
message: "Config saved!",
});
type: 'positive',
message: 'Config saved!'
})
Quasar.Notify.create({
type: "warning",
type: 'warning',
message:
"You need to restart the server for the changes to take effect!",
});
'You need to restart the server for the changes to take effect!'
})
} catch (error) {
Quasar.Notify.create({
type: "negative",
message: "Error saving config: " + String(error),
});
console.error("Error saving config:", error);
type: 'negative',
message: 'Error saving config: ' + String(error)
})
console.error('Error saving config:', error)
}
},
}
},
created: function () {
this.fetchConfig();
},
});
this.fetchConfig()
}
})