mirror of
https://github.com/esphome/esphome.git
synced 2025-07-29 06:36:45 +00:00
Fix WebServer routes constant naming convention (#9497)
This commit is contained in:
parent
f8c45573f3
commit
f78e71c86a
@ -1887,7 +1887,7 @@ void WebServer::handleRequest(AsyncWebServerRequest *request) {
|
|||||||
void (WebServer::*handler)(AsyncWebServerRequest *, const UrlMatch &);
|
void (WebServer::*handler)(AsyncWebServerRequest *, const UrlMatch &);
|
||||||
};
|
};
|
||||||
|
|
||||||
static const ComponentRoute routes[] = {
|
static const ComponentRoute ROUTES[] = {
|
||||||
#ifdef USE_SENSOR
|
#ifdef USE_SENSOR
|
||||||
{"sensor", &WebServer::handle_sensor_request},
|
{"sensor", &WebServer::handle_sensor_request},
|
||||||
#endif
|
#endif
|
||||||
@ -1948,7 +1948,7 @@ void WebServer::handleRequest(AsyncWebServerRequest *request) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Check each route
|
// Check each route
|
||||||
for (const auto &route : routes) {
|
for (const auto &route : ROUTES) {
|
||||||
if (match.domain_equals(route.domain)) {
|
if (match.domain_equals(route.domain)) {
|
||||||
(this->*route.handler)(request, match);
|
(this->*route.handler)(request, match);
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user