🪄 Formats FeatureService
This commit is contained in:
@@ -45,8 +45,7 @@ void FeaturesService::begin() {
|
||||
return response.send();
|
||||
});
|
||||
|
||||
ESP_LOGV("FeaturesService", "Registered GET endpoint: %s",
|
||||
FEATURES_SERVICE_PATH);
|
||||
ESP_LOGV("FeaturesService", "Registered GET endpoint: %s", FEATURES_SERVICE_PATH);
|
||||
}
|
||||
|
||||
void FeaturesService::addFeature(String feature, bool enabled) {
|
||||
|
||||
@@ -24,22 +24,20 @@
|
||||
|
||||
#define FEATURES_SERVICE_PATH "/api/features"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
String feature;
|
||||
bool enabled;
|
||||
} UserFeature;
|
||||
|
||||
class FeaturesService
|
||||
{
|
||||
public:
|
||||
class FeaturesService {
|
||||
public:
|
||||
FeaturesService(PsychicHttpServer *server);
|
||||
|
||||
void begin();
|
||||
|
||||
void addFeature(String feature, bool enabled);
|
||||
|
||||
private:
|
||||
private:
|
||||
PsychicHttpServer *_server;
|
||||
std::vector<UserFeature> userFeatures;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user