@@ -42,12 +42,12 @@ void APB::WebServer::setup() {
4242 onJsonRequest (" /api/config/fanDuty" , std::bind (&WebServer::onConfigFanDuty, this , _1, _2), HTTP_POST);
4343 onJsonRequest (" /api/config/pdVoltage" , std::bind (&WebServer::onConfigPDVoltage, this , _1, _2), HTTP_POST);
4444 onJsonRequest (" /api/config/powerSourceType" , std::bind (&WebServer::onConfigPowerSourceType, this , _1, _2), HTTP_POST);
45- webserver.on (" /api/metrics" , HTTP_GET, std::bind (&WebServer::onGetMetrics, this , _1));
46- webserver.on (" /api/config/write" , HTTP_POST, std::bind (&WebServer::onPostWriteConfig, this , _1));
47- webserver.on (" /api/config" , HTTP_GET, std::bind (&WebServer::onGetConfig, this , _1));
48- webserver.on (" /api/info" , HTTP_GET, std::bind (&WebServer::onGetESPInfo, this , _1));
49- webserver.on (" /api/history" , HTTP_GET, std::bind (&WebServer::onGetHistory, this , _1));
50- webserver.on (" /api/power" , HTTP_GET, std::bind (&WebServer::onGetPower, this , _1));
45+ webserver.on (" /api/metrics" , HTTP_GET, std::bind (&WebServer::onGetMetrics, this , _1), nullptr , nullptr );
46+ webserver.on (" /api/config/write" , HTTP_POST, std::bind (&WebServer::onPostWriteConfig, this , _1), nullptr , nullptr );
47+ webserver.on (" /api/config" , HTTP_GET, std::bind (&WebServer::onGetConfig, this , _1), nullptr , nullptr );
48+ webserver.on (" /api/info" , HTTP_GET, std::bind (&WebServer::onGetESPInfo, this , _1), nullptr , nullptr );
49+ webserver.on (" /api/history" , HTTP_GET, std::bind (&WebServer::onGetHistory, this , _1), nullptr , nullptr );
50+ webserver.on (" /api/power" , HTTP_GET, std::bind (&WebServer::onGetPower, this , _1), nullptr , nullptr );
5151 webserver.on (" /api/logs" , HTTP_GET, [](AsyncWebServerRequest *request){
5252 auto response = request->beginResponseStream (" text/plain" );
5353 response->setCode (200 );
@@ -58,21 +58,21 @@ void APB::WebServer::setup() {
5858 backlog.pop ();
5959 }
6060 request->send (response);
61- });
62- webserver.on (" /api/wifi/connect" , HTTP_POST, std::bind (&WiFiManager::onPostReconnectWiFi, &WiFiManager::Instance, _1));
61+ }, nullptr , nullptr );
62+ webserver.on (" /api/wifi/connect" , HTTP_POST, std::bind (&WiFiManager::onPostReconnectWiFi, &WiFiManager::Instance, _1), nullptr , nullptr );
6363 #ifdef CONFIGURATION_FOR_PROTOTYPE
6464 server.on (" /api/wifi" , HTTP_DELETE, [this ](AsyncWebServerRequest *request){
6565 new Task (1'000 , TASK_ONCE, [](){WiFi.disconnect ();}, &scheduler, true );
6666 JsonWebResponse response (request);
6767 response.root ()[" status" ] = " Dropping WiFi" ;
68- });
68+ }, nullptr , nullptr );
6969 #endif
70- webserver.on (" /api/wifi" , HTTP_GET, [](AsyncWebServerRequest *request){ WiFiManager::Instance.onGetWiFiStatus (request); });
71- webserver.on (" /api/restart" , HTTP_POST, std::bind (&WebServer::onRestart, this , _1));
70+ webserver.on (" /api/wifi" , HTTP_GET, [](AsyncWebServerRequest *request){ WiFiManager::Instance.onGetWiFiStatus (request); }, nullptr , nullptr );
71+ webserver.on (" /api/restart" , HTTP_POST, std::bind (&WebServer::onRestart, this , _1), nullptr , nullptr );
7272
73- webserver.on (" /api/status" , HTTP_GET, std::bind (&WebServer::onGetStatus, this , _1));
74- webserver.on (" /api/ambient" , HTTP_GET, std::bind (&WebServer::onGetAmbient, this , _1));
75- webserver.on (" /api/pwmOutputs" , HTTP_GET, std::bind (&WebServer::onGetPWMOutputs, this , _1));
73+ webserver.on (" /api/status" , HTTP_GET, std::bind (&WebServer::onGetStatus, this , _1), nullptr , nullptr );
74+ webserver.on (" /api/ambient" , HTTP_GET, std::bind (&WebServer::onGetAmbient, this , _1), nullptr , nullptr );
75+ webserver.on (" /api/pwmOutputs" , HTTP_GET, std::bind (&WebServer::onGetPWMOutputs, this , _1), nullptr , nullptr );
7676 onJsonRequest (" /api/pwmOutput" , std::bind (&APB::WebServer::onPostSetPWMOutputs, this , _1, _2), HTTP_POST);
7777
7878 events.onConnect ([](AsyncEventSourceClient *client){
0 commit comments