BE+FE: work on bulk deleting devices and code cleanup #1493

Signed-off-by: jokob-sk <jokob.sk@gmail.com>
This commit is contained in:
jokob-sk
2026-02-07 10:37:31 +11:00
parent 6bc2de6e24
commit 0ce4e5f70c
8 changed files with 41 additions and 60 deletions

View File

@@ -373,7 +373,10 @@ function deleteAllDevices()
url,
method: "DELETE",
headers: { "Authorization": `Bearer ${apiToken}` },
data: JSON.stringify({ macs: null }),
data: JSON.stringify({
macs: [],
confirm_delete_all: true
}),
contentType: "application/json",
success: function(response) {
showMessage(response.success ? "All devices deleted successfully" : (response.error || "Unknown error"));