From cab870f6ffffad1f341e08f81a32a9ad16347345 Mon Sep 17 00:00:00 2001 From: Vlad Stan Date: Tue, 7 Feb 2023 14:31:56 +0200 Subject: [PATCH] fix: only send required info for toggling a relay --- static/js/index.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/static/js/index.js b/static/js/index.js index a76d950..66a9f49 100644 --- a/static/js/index.js +++ b/static/js/index.js @@ -141,11 +141,15 @@ const relays = async () => { toggleRelay: async function (relay) { console.log('### toggleRelay', relay) try { - const response = await LNbits.api.request( + await LNbits.api.request( 'PUT', '/nostrrelay/api/v1/relay/' + relay.id, this.g.user.wallets[0].adminkey, - relay + { + active: relay.active, + id: relay.id, + name: relay.name + } ) } catch (error) { LNbits.utils.notifyApiError(error)