FE+BE: cleanup

Signed-off-by: jokob-sk <jokob.sk@gmail.com>
This commit is contained in:
jokob-sk
2025-12-18 17:16:17 +11:00
parent 70c65a17b3
commit 5cd4139d01
11 changed files with 382 additions and 616 deletions

View File

@@ -308,6 +308,7 @@
const apiToken = getSetting("API_TOKEN"); // dynamic token
const host = window.location.hostname;
const protocol = window.location.protocol;
const port = getSetting("GRAPHQL_PORT");
mac = $('#NEWDEV_devMac').val();
@@ -356,7 +357,7 @@
$.ajax({
url: "http://" + host + ":" + port + "/device/" + encodeURIComponent(mac),
url: `${protocol}//${host}:${port}/device/${encodeURIComponent(mac)}`,
type: "POST",
headers: {
"Authorization": "Bearer " + apiToken,