Skip to content

Commit

Permalink
🪈 Updates pai path for ap and sta
Browse files Browse the repository at this point in the history
  • Loading branch information
runeharlyk committed Nov 4, 2024
1 parent 4dca9a9 commit 40eb06a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
6 changes: 3 additions & 3 deletions app/src/routes/wifi/ap/Accesspoint.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
let formField: any;
async function getAPStatus() {
const result = await api.get<ApStatus>('/api/apStatus');
const result = await api.get<ApStatus>('/api/wifi/ap/status');
if (result.isErr()) {
console.error('Error:', result.inner);
return;
Expand All @@ -29,7 +29,7 @@
}
async function getAPSettings() {
const result = await api.get<ApSettings>('/api/apSetting');
const result = await api.get<ApSettings>('/api/wifi/ap/settings');
if (result.isErr()) {
console.error('Error:', result.inner);
return;
Expand Down Expand Up @@ -77,7 +77,7 @@
};
async function postAPSettings(data: ApSettings) {
const result = await api.post<ApSettings>('/api/apSettings', data);
const result = await api.post<ApSettings>('/api/wifi/ap/settings', data);
if (result.isErr()) {
notifications.error('User not authorized.', 3000);
console.error('Error:', result.inner);
Expand Down
6 changes: 3 additions & 3 deletions app/src/routes/wifi/sta/Wifi.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
let formErrorhostname = false;
async function getWifiStatus() {
const result = await api.get<WifiStatus>('/api/wifi/status');
const result = await api.get<WifiStatus>('/api/wifi/sta/status');
if (result.isErr()) {
console.error(`Error occurred while fetching: `, result.inner);
return;
Expand All @@ -85,7 +85,7 @@
}
async function getWifiSettings() {
const result = await api.get<WifiSettings>('/api/wifi/settings');
const result = await api.get<WifiSettings>('/api/wifi/sta/settings');
if (result.isErr()) {
console.error(`Error occurred while fetching: `, result.inner);
return;
Expand All @@ -105,7 +105,7 @@
});
async function postWiFiSettings(data: WifiSettings) {
const result = await api.post<WifiSettings>('/api/wifi/settings', data);
const result = await api.post<WifiSettings>('/api/wifi/sta/settings', data);
if (result.isErr()) {
console.error(`Error occurred while fetching: `, result.inner);
notifications.error('User not authorized.', 3000);
Expand Down
2 changes: 0 additions & 2 deletions esp32/lib/ESP32-sveltekit/ap_settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 40eb06a

Please sign in to comment.