feat: show wss URL

This commit is contained in:
Vlad Stan 2023-02-24 15:10:58 +02:00
parent 5e313c0282
commit 63be2b5b2d
3 changed files with 29 additions and 6 deletions

View file

@ -92,6 +92,13 @@ async function relayDetails(path) {
{value: 'block', label: 'Block New Events'},
{value: 'prune', label: 'Prune Old Events'}
]
},
wssLink: function () {
this.relay.config.domain =
this.relay.config.domain || window.location.hostname
return (
'wss://' + this.relay.config.domain + '/nostrrelay/' + this.relay.id
)
}
},
@ -138,7 +145,7 @@ async function relayDetails(path) {
updateRelay: async function () {
try {
const {data} = await LNbits.api.request(
'PUT',
'PATCH',
'/nostrrelay/api/v1/relay/' + this.relayId,
this.adminkey,
this.relay