File tree 3 files changed +6
-8
lines changed
esp32/lib/ESP32-sveltekit 3 files changed +6
-8
lines changed Original file line number Diff line number Diff line change 19
19
let formField: any ;
20
20
21
21
async function getAPStatus() {
22
- const result = await api .get <ApStatus >(' /api/apStatus ' );
22
+ const result = await api .get <ApStatus >(' /api/wifi/ap/status ' );
23
23
if (result .isErr ()) {
24
24
console .error (' Error:' , result .inner );
25
25
return ;
29
29
}
30
30
31
31
async function getAPSettings() {
32
- const result = await api .get <ApSettings >(' /api/apSetting ' );
32
+ const result = await api .get <ApSettings >(' /api/wifi/ap/settings ' );
33
33
if (result .isErr ()) {
34
34
console .error (' Error:' , result .inner );
35
35
return ;
77
77
};
78
78
79
79
async function postAPSettings(data : ApSettings ) {
80
- const result = await api .post <ApSettings >(' /api/apSettings ' , data );
80
+ const result = await api .post <ApSettings >(' /api/wifi/ap/settings ' , data );
81
81
if (result .isErr ()) {
82
82
notifications .error (' User not authorized.' , 3000 );
83
83
console .error (' Error:' , result .inner );
Original file line number Diff line number Diff line change 75
75
let formErrorhostname = false ;
76
76
77
77
async function getWifiStatus() {
78
- const result = await api .get <WifiStatus >(' /api/wifi/status' );
78
+ const result = await api .get <WifiStatus >(' /api/wifi/sta/ status' );
79
79
if (result .isErr ()) {
80
80
console .error (` Error occurred while fetching: ` , result .inner );
81
81
return ;
85
85
}
86
86
87
87
async function getWifiSettings() {
88
- const result = await api .get <WifiSettings >(' /api/wifi/settings' );
88
+ const result = await api .get <WifiSettings >(' /api/wifi/sta/ settings' );
89
89
if (result .isErr ()) {
90
90
console .error (` Error occurred while fetching: ` , result .inner );
91
91
return ;
105
105
});
106
106
107
107
async function postWiFiSettings(data : WifiSettings ) {
108
- const result = await api .post <WifiSettings >(' /api/wifi/settings' , data );
108
+ const result = await api .post <WifiSettings >(' /api/wifi/sta/ settings' , data );
109
109
if (result .isErr ()) {
110
110
console .error (` Error occurred while fetching: ` , result .inner );
111
111
notifications .error (' User not authorized.' , 3000 );
Original file line number Diff line number Diff line change 47
47
#define FACTORY_AP_MAX_CLIENTS 4
48
48
#endif
49
49
50
- #define AP_SETTINGS_SERVICE_PATH " /api/apSettings"
51
-
52
50
#define AP_MODE_ALWAYS 0
53
51
#define AP_MODE_DISCONNECTED 1
54
52
#define AP_MODE_NEVER 2
You can’t perform that action at this time.
0 commit comments