mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 07:49:52 +03:00
refactoring
This commit is contained in:
@@ -3,9 +3,9 @@
|
||||
|
||||
#include <WiFi.h>
|
||||
#include <AsyncTCP.h>
|
||||
|
||||
#include <ESPAsyncWebServer.h>
|
||||
#include <SecurityManager.h>
|
||||
|
||||
#include "SecurityManager.h"
|
||||
|
||||
#define RESTART_SERVICE_PATH "/rest/restart"
|
||||
#define PARTITION_SERVICE_PATH "/rest/partition"
|
||||
@@ -14,11 +14,7 @@ class RestartService {
|
||||
public:
|
||||
RestartService(AsyncWebServer * server, SecurityManager * securityManager);
|
||||
|
||||
static void restartNow() {
|
||||
WiFi.disconnect(true);
|
||||
delay(500);
|
||||
ESP.restart();
|
||||
}
|
||||
static void restartNow();
|
||||
|
||||
private:
|
||||
void restart(AsyncWebServerRequest * request);
|
||||
|
||||
Reference in New Issue
Block a user