You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`onYoYoRequestDELETE()` - the whole implementation is commented out, and it always returns 500:
```cpp
int YoYoWiFiManager::onYoYoRequestDELETE(uint8_t *data, size_t len, AsyncWebServerRequest *request) {
//TODO fix this!
...(all commented out)...
return(500);
}
```
`onYoYoMessageDELETE()` - even if the above were fixed and this got called, it doesn't actually do anything:
```cpp
if (message["path"] == "/yoyo/credentials") {
//TODO: implement delete using YoYoSettings::removeNetwork()
success = true;
}
```
Problem
So today, two independent bugs stack to make DELETE completely non-functional: the request never reaches `onYoYoMessageDELETE()` at all (every DELETE to any `/yoyo/*` path gets a 500), and even the handler for the one implemented path (`/yoyo/credentials`) just claims success without calling `YoYoSettings::removeNetwork()` - i.e. it's a no-op that lies about succeeding.
Wire `onYoYoMessageDELETE()`'s `/yoyo/credentials` case up to `YoYoSettings::removeNetwork(ssid)`, which already exists and is otherwise unused from any endpoint.
Where
Two related sites in `src/YoYoWiFiManager.cpp`:
`onYoYoRequestDELETE()` - the whole implementation is commented out, and it always returns 500:
```cpp
int YoYoWiFiManager::onYoYoRequestDELETE(uint8_t *data, size_t len, AsyncWebServerRequest *request) {
//TODO fix this!
...(all commented out)...
return(500);
}
```
`onYoYoMessageDELETE()` - even if the above were fixed and this got called, it doesn't actually do anything:
```cpp
if (message["path"] == "/yoyo/credentials") {
//TODO: implement delete using YoYoSettings::removeNetwork()
success = true;
}
```
Problem
So today, two independent bugs stack to make DELETE completely non-functional: the request never reaches `onYoYoMessageDELETE()` at all (every DELETE to any `/yoyo/*` path gets a 500), and even the handler for the one implemented path (`/yoyo/credentials`) just claims success without calling `YoYoSettings::removeNetwork()` - i.e. it's a no-op that lies about succeeding.
Ask