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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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;