refactor: simplify endpoint and capabilities
This commit is contained in:
@@ -30,14 +30,19 @@ public:
|
||||
const std::vector<ParamSpec>& params);
|
||||
|
||||
static const char* methodToStr(int method);
|
||||
|
||||
// Access to endpoints for endpoints endpoint
|
||||
const std::vector<EndpointInfo>& getEndpoints() const { return endpoints; }
|
||||
|
||||
private:
|
||||
AsyncWebServer server;
|
||||
NodeContext& ctx;
|
||||
TaskManager& taskManager;
|
||||
std::vector<std::reference_wrapper<Service>> services;
|
||||
std::vector<std::tuple<String, int>> serviceRegistry;
|
||||
std::vector<EndpointInfo> endpoints; // Single source of truth for endpoints
|
||||
|
||||
// Internal helpers
|
||||
void registerServiceForLocalNode(const String& uri, int method);
|
||||
void registerEndpoint(const String& uri, int method,
|
||||
const std::vector<ParamSpec>& params,
|
||||
const String& serviceName);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user