feat: edit relay info

This commit is contained in:
Vlad Stan 2023-02-07 14:44:11 +02:00
parent cab870f6ff
commit c05ecb054d
2 changed files with 84 additions and 19 deletions

View file

@ -8,6 +8,7 @@ async function relayDetails(path) {
data: function () {
return {
tab: 'info',
relay: null,
formDialogItem: {
show: false,
data: {
@ -40,9 +41,23 @@ async function relayDetails(path) {
LNbits.utils.notifyApiError(error)
}
})
},
getRelay: async function () {
try {
const {data} = await LNbits.api.request(
'GET',
'/nostrrelay/api/v1/relay/' + this.relayId,
this.inkey
)
this.relay = data
} catch (error) {
LNbits.utils.notifyApiError(error)
}
}
},
created: async function () {}
created: async function () {
await this.getRelay()
}
})
}