1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-01 19:02:18 +01:00

Fix WebServer routes constant naming convention (#9497)

This commit is contained in:
J. Nick Koston
2025-07-14 10:13:24 -10:00
committed by GitHub
parent f8c45573f3
commit f78e71c86a

View File

@@ -1887,7 +1887,7 @@ void WebServer::handleRequest(AsyncWebServerRequest *request) {
void (WebServer::*handler)(AsyncWebServerRequest *, const UrlMatch &);
};
static const ComponentRoute routes[] = {
static const ComponentRoute ROUTES[] = {
#ifdef USE_SENSOR
{"sensor", &WebServer::handle_sensor_request},
#endif
@@ -1948,7 +1948,7 @@ void WebServer::handleRequest(AsyncWebServerRequest *request) {
};
// Check each route
for (const auto &route : routes) {
for (const auto &route : ROUTES) {
if (match.domain_equals(route.domain)) {
(this->*route.handler)(request, match);
return;