remove network from activation phase

This commit is contained in:
2018-11-08 13:46:17 +01:00
parent bb81391d00
commit f290ec6197
19 changed files with 138 additions and 66 deletions

View File

@@ -2,9 +2,10 @@
#define __WEB_SERVER_PLUGIN__
#include <FS.h>
#include <ESPAsyncWebServer.h>
#include "TaskSchedulerDeclarations.h"
#include "Plugin.h"
#include <plugins/WebSO.h>
#include <plugins/WebServerConfig.h>
using namespace std;
using namespace std::placeholders;
@@ -18,7 +19,7 @@ class WebServerPlugin : public Plugin {
config = cfg;
server = webServer;
}
void activate(Scheduler* userScheduler, Network* network){
void activate(Scheduler* userScheduler){
server->serveStatic(config.contextPath, SPIFFS, config.docRoot).setDefaultFile(config.defaultFile);
// TODO add auth if configured
// server->setAuthentication("user", "pass");