mirror of
https://github.com/esphome/esphome.git
synced 2025-07-28 22:26:36 +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 &);
|
||||
};
|
||||
|
||||
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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user