feat: edit relay info
This commit is contained in:
parent
cab870f6ff
commit
c05ecb054d
2 changed files with 84 additions and 19 deletions
|
|
@ -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()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue