From 903dcce2d797e38ca0b0250d38bebf3eb569db9c Mon Sep 17 00:00:00 2001 From: PaulVua Date: Tue, 17 Mar 2026 18:54:44 +0100 Subject: [PATCH] Fix: config.json -> get_config_sqlite dans wifi.html Co-Authored-By: Claude Opus 4.6 (1M context) --- html/wifi.html | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/html/wifi.html b/html/wifi.html index 0325a00..b944b9c 100755 --- a/html/wifi.html +++ b/html/wifi.html @@ -413,11 +413,12 @@ function wifi_scan(){ } window.onload = function() { - fetch('../config.json') - .then(response => response.json()) - .then(data => { - console.log("Getting config file (onload)"); - const deviceID = data.deviceID.trim().toUpperCase(); + $.ajax({ + url: 'launcher.php?type=get_config_sqlite', + dataType: 'json', + method: 'GET', + success: function(data) { + console.log("Getting config (onload)"); const deviceName = data.deviceName; function updateSidebarDeviceName(deviceName) { @@ -476,9 +477,12 @@ function wifi_scan(){ } }); - }) - .catch(error => console.error('Error loading config.json:', error)); + }, + error: function(xhr, status, error) { + console.error('AJAX request failed:', status, error); } + }); + }