mirror of
https://github.com/esphome/esphome.git
synced 2025-09-02 03:12:20 +01:00
Fix WebServer routes constant naming convention (#9497)
This commit is contained in:
@@ -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;
|
||||||
|
Reference in New Issue
Block a user