diff --git a/app/src/routes/wifi/ap/Accesspoint.svelte b/app/src/routes/wifi/ap/Accesspoint.svelte index 9ec229ba..ee93ba49 100644 --- a/app/src/routes/wifi/ap/Accesspoint.svelte +++ b/app/src/routes/wifi/ap/Accesspoint.svelte @@ -19,7 +19,7 @@ let formField: any; async function getAPStatus() { - const result = await api.get('/api/apStatus'); + const result = await api.get('/api/wifi/ap/status'); if (result.isErr()) { console.error('Error:', result.inner); return; @@ -29,7 +29,7 @@ } async function getAPSettings() { - const result = await api.get('/api/apSetting'); + const result = await api.get('/api/wifi/ap/settings'); if (result.isErr()) { console.error('Error:', result.inner); return; @@ -77,7 +77,7 @@ }; async function postAPSettings(data: ApSettings) { - const result = await api.post('/api/apSettings', data); + const result = await api.post('/api/wifi/ap/settings', data); if (result.isErr()) { notifications.error('User not authorized.', 3000); console.error('Error:', result.inner); diff --git a/app/src/routes/wifi/sta/Wifi.svelte b/app/src/routes/wifi/sta/Wifi.svelte index 3f2dad0b..4eb695a1 100644 --- a/app/src/routes/wifi/sta/Wifi.svelte +++ b/app/src/routes/wifi/sta/Wifi.svelte @@ -75,7 +75,7 @@ let formErrorhostname = false; async function getWifiStatus() { - const result = await api.get('/api/wifi/status'); + const result = await api.get('/api/wifi/sta/status'); if (result.isErr()) { console.error(`Error occurred while fetching: `, result.inner); return; @@ -85,7 +85,7 @@ } async function getWifiSettings() { - const result = await api.get('/api/wifi/settings'); + const result = await api.get('/api/wifi/sta/settings'); if (result.isErr()) { console.error(`Error occurred while fetching: `, result.inner); return; @@ -105,7 +105,7 @@ }); async function postWiFiSettings(data: WifiSettings) { - const result = await api.post('/api/wifi/settings', data); + const result = await api.post('/api/wifi/sta/settings', data); if (result.isErr()) { console.error(`Error occurred while fetching: `, result.inner); notifications.error('User not authorized.', 3000); diff --git a/esp32/lib/ESP32-sveltekit/ap_settings.h b/esp32/lib/ESP32-sveltekit/ap_settings.h index 1ecbfd2f..8a98e3d6 100644 --- a/esp32/lib/ESP32-sveltekit/ap_settings.h +++ b/esp32/lib/ESP32-sveltekit/ap_settings.h @@ -47,8 +47,6 @@ #define FACTORY_AP_MAX_CLIENTS 4 #endif -#define AP_SETTINGS_SERVICE_PATH "/api/apSettings" - #define AP_MODE_ALWAYS 0 #define AP_MODE_DISCONNECTED 1 #define AP_MODE_NEVER 2