diff options
Diffstat (limited to 'web/share/js/kvm/gpio.js')
-rw-r--r-- | web/share/js/kvm/gpio.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/web/share/js/kvm/gpio.js b/web/share/js/kvm/gpio.js index 4bee901a..fe326205 100644 --- a/web/share/js/kvm/gpio.js +++ b/web/share/js/kvm/gpio.js @@ -181,7 +181,7 @@ export function Gpio(__recorder) { confirm = el.getAttribute("data-confirm-off"); } let act = () => { - __sendPost(`/api/gpio/switch?channel=${channel}&state=${to}`); + __sendPost("/api/gpio/switch", {"channel": channel, "state": to}); __recorder.recordGpioSwitchEvent(channel, to); }; if (confirm) { @@ -201,7 +201,7 @@ export function Gpio(__recorder) { let channel = el.getAttribute("data-channel"); let confirm = el.getAttribute("data-confirm"); let act = () => { - __sendPost(`/api/gpio/pulse?channel=${channel}`); + __sendPost("/api/gpio/pulse", {"channel": channel}); __recorder.recordGpioPulseEvent(channel); }; if (confirm) { |