RomeHein / ESPecial

ESP32 automation with web interface and telegram bot
GNU General Public License v3.0
111 stars 17 forks source link

Bug: restart button calls not existant page #6

Closed sjfaustino closed 4 years ago

sjfaustino commented 4 years ago

When you press the restart button, the serial console shows "Server: page not found". The index.h has: // Restart ESP const restart = async () => { try { const res = await fetch(window.location.href + 'restart'); blocker.classList.add('hidden'); location.reload(); but I don't see a server.on("/restart" on ServerHander.cpp.

RomeHein commented 4 years ago

That's indeed a mistake. Certainly a bad copy/past in the code, the endpoint that should have been named "restart" is named ''setrestarttings" 🤦‍♂️😅