From 9f2f4c87c7b7063f7dca5f8abd961ee0d6dd591a Mon Sep 17 00:00:00 2001 From: avollkopf <43980694+avollkopf@users.noreply.github.com> Date: Sun, 16 Apr 2023 17:56:00 +0200 Subject: [PATCH] changed api get all config parameters --- cbpi/__init__.py | 2 +- cbpi/controller/config_controller.py | 1 - cbpi/http_endpoints/http_config.py | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/cbpi/__init__.py b/cbpi/__init__.py index 9843a78..273ff68 100644 --- a/cbpi/__init__.py +++ b/cbpi/__init__.py @@ -1,3 +1,3 @@ -__version__ = "4.1.8.a13" +__version__ = "4.1.8.a14" __codename__ = "Groundhog Day" diff --git a/cbpi/controller/config_controller.py b/cbpi/controller/config_controller.py index d63685a..d56fe50 100644 --- a/cbpi/controller/config_controller.py +++ b/cbpi/controller/config_controller.py @@ -31,7 +31,6 @@ class ConfigController: data = json.load(json_file) for key, value in data.items(): self.cache[key] = Config(name=value.get("name"), value=value.get("value"), description=value.get("description"), type=ConfigType(value.get("type", "string")), source=value.get("source", "craftbeerpi"), options=value.get("options", None)) - logging.error(self.cache) def get(self, name, default=None): self.logger.debug("GET CONFIG VALUE %s (default %s)" % (name, default)) diff --git a/cbpi/http_endpoints/http_config.py b/cbpi/http_endpoints/http_config.py index 8efd20f..d762c60 100644 --- a/cbpi/http_endpoints/http_config.py +++ b/cbpi/http_endpoints/http_config.py @@ -56,7 +56,7 @@ class ConfigHttpEndpoints: "200": description: successful operation """ - return web.json_response(self.controller.cache, dumps=json_dumps) + return web.json_response(self.controller.get_state(), dumps=json_dumps) @request_mapping(path="/{name}/", method="POST", auth_required=False) async def http_paramter(self, request) -> web.Response: