FE - graphql response wrap into data

This commit is contained in:
jokob-sk
2025-08-21 15:51:58 +10:00
parent 73fd094cfc
commit 39c556576c
2 changed files with 3 additions and 3 deletions

View File

@@ -199,8 +199,8 @@ $settingsJSON_DB = json_encode($settings, JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX
console.log("Response:", response);
// Handle the successful response
if (response && response.settings) {
const settingsData = response.settings.settings;
if (response && response.data && response.data.settings && response.data.settings.settings) {
const settingsData = response.data.settings.settings;
console.log("Settings:", settingsData);
// Wrong number of settings processing

View File

@@ -249,7 +249,7 @@ function fetchUsedIps(callback) {
console.log(response);
const usedIps = (response?.devices?.devices || [])
const usedIps = (response?.data?.devices?.devices || [])
.map(d => d.devLastIP)
.filter(ip => ip && ip.includes('.'));
callback(usedIps);