Update from my laptop

This commit is contained in:
Jm Casler 2020-09-19 11:24:55 -07:00
parent 6e3b22c624
commit c57a9a8613

View File

@ -27,8 +27,11 @@ void handleWebResponse()
void initWebServer() void initWebServer()
{ {
webserver.onNotFound(handleNotFound); webserver.onNotFound(handleNotFound);
// webserver.on("/", handleJSONChatHistory); webserver.on("/json/chat/send/channel", handleJSONChatHistory);
// webserver.on("/json/chat/history", handleJSONChatHistory); webserver.on("/json/chat/send/user", handleJSONChatHistory);
webserver.on("/json/chat/history/channel", handleJSONChatHistory);
webserver.on("/json/chat/history/user", handleJSONChatHistory);
webserver.on("/json/stats", handleJSONChatHistory);
webserver.on("/hotspot-detect.html", handleHotspot); webserver.on("/hotspot-detect.html", handleHotspot);
webserver.on("/", handleRoot); webserver.on("/", handleRoot);
webserver.begin(); webserver.begin();
@ -57,7 +60,8 @@ void handleJSONChatHistory()
void handleNotFound() void handleNotFound()
{ {
String message = "File Not Found\n\n"; String message = "";
message += "File Not Found\n\n";
message += "URI: "; message += "URI: ";
message += webserver.uri(); message += webserver.uri();
message += "\nMethod: "; message += "\nMethod: ";
@ -71,8 +75,6 @@ void handleNotFound()
} }
Serial.println(message); Serial.println(message);
webserver.send(404, "text/plain", message); webserver.send(404, "text/plain", message);
/*
*/
} }
/* /*