Fork of the excellent esp8266-react - https://github.com/rjwats/esp8266-react
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
634 B

  1. #ifndef FactoryResetService_h
  2. #define FactoryResetService_h
  3. #ifdef ESP32
  4. #include <WiFi.h>
  5. #include <AsyncTCP.h>
  6. #elif defined(ESP8266)
  7. #include <ESP8266WiFi.h>
  8. #include <ESPAsyncTCP.h>
  9. #endif
  10. #include <ESPAsyncWebServer.h>
  11. #include <SecurityManager.h>
  12. #include <FS.h>
  13. #define FS_CONFIG_DIRECTORY "/config"
  14. #define FACTORY_RESET_SERVICE_PATH "/rest/factoryReset"
  15. class FactoryResetService {
  16. FS* fs;
  17. public:
  18. FactoryResetService(AsyncWebServer* server, FS* fs, SecurityManager* securityManager);
  19. void factoryReset();
  20. private:
  21. void handleRequest(AsyncWebServerRequest* request);
  22. };
  23. #endif // end FactoryResetService_h