🪈 Updates pai path for ap and sta
This commit is contained in:
@@ -19,7 +19,7 @@
|
|||||||
let formField: any;
|
let formField: any;
|
||||||
|
|
||||||
async function getAPStatus() {
|
async function getAPStatus() {
|
||||||
const result = await api.get<ApStatus>('/api/apStatus');
|
const result = await api.get<ApStatus>('/api/wifi/ap/status');
|
||||||
if (result.isErr()) {
|
if (result.isErr()) {
|
||||||
console.error('Error:', result.inner);
|
console.error('Error:', result.inner);
|
||||||
return;
|
return;
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function getAPSettings() {
|
async function getAPSettings() {
|
||||||
const result = await api.get<ApSettings>('/api/apSetting');
|
const result = await api.get<ApSettings>('/api/wifi/ap/settings');
|
||||||
if (result.isErr()) {
|
if (result.isErr()) {
|
||||||
console.error('Error:', result.inner);
|
console.error('Error:', result.inner);
|
||||||
return;
|
return;
|
||||||
@@ -77,7 +77,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
async function postAPSettings(data: ApSettings) {
|
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()) {
|
if (result.isErr()) {
|
||||||
notifications.error('User not authorized.', 3000);
|
notifications.error('User not authorized.', 3000);
|
||||||
console.error('Error:', result.inner);
|
console.error('Error:', result.inner);
|
||||||
|
|||||||
@@ -75,7 +75,7 @@
|
|||||||
let formErrorhostname = false;
|
let formErrorhostname = false;
|
||||||
|
|
||||||
async function getWifiStatus() {
|
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()) {
|
if (result.isErr()) {
|
||||||
console.error(`Error occurred while fetching: `, result.inner);
|
console.error(`Error occurred while fetching: `, result.inner);
|
||||||
return;
|
return;
|
||||||
@@ -85,7 +85,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function getWifiSettings() {
|
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()) {
|
if (result.isErr()) {
|
||||||
console.error(`Error occurred while fetching: `, result.inner);
|
console.error(`Error occurred while fetching: `, result.inner);
|
||||||
return;
|
return;
|
||||||
@@ -105,7 +105,7 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
async function postWiFiSettings(data: WifiSettings) {
|
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()) {
|
if (result.isErr()) {
|
||||||
console.error(`Error occurred while fetching: `, result.inner);
|
console.error(`Error occurred while fetching: `, result.inner);
|
||||||
notifications.error('User not authorized.', 3000);
|
notifications.error('User not authorized.', 3000);
|
||||||
|
|||||||
@@ -47,8 +47,6 @@
|
|||||||
#define FACTORY_AP_MAX_CLIENTS 4
|
#define FACTORY_AP_MAX_CLIENTS 4
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define AP_SETTINGS_SERVICE_PATH "/api/apSettings"
|
|
||||||
|
|
||||||
#define AP_MODE_ALWAYS 0
|
#define AP_MODE_ALWAYS 0
|
||||||
#define AP_MODE_DISCONNECTED 1
|
#define AP_MODE_DISCONNECTED 1
|
||||||
#define AP_MODE_NEVER 2
|
#define AP_MODE_NEVER 2
|
||||||
|
|||||||
Reference in New Issue
Block a user