fix(devices): kebab Unban no longer calls Ban API (Fixes #323)

This commit is contained in:
UNITRONIX
2026-07-29 19:05:46 +02:00
parent fe1c3963dc
commit 7b30765efe
2 changed files with 5 additions and 1 deletions
+3
View File
@@ -3,6 +3,9 @@
### Changed
- _(none yet)_
### Fixed
- **Devices kebab Unban called Ban (#323):** kebab menu passed boolean `device.banned` while the handler only treated the string `'true'` as banned, so Unban opened the Ban modal and POSTed `/ban`. Both boolean and dataset string are accepted now. Ships via panel update.
---
## [3.4.2] — 2026-07-28
+2 -1
View File
@@ -1154,7 +1154,8 @@
break;
case 'toggle-ban':
await toggleBan(deviceId, data.banned === 'true');
// Kebab passes device object (boolean); context menu passes dataset (string)
await toggleBan(deviceId, data.banned === true || data.banned === 'true');
break;
case 'change-id':