changed api get all config parameters

This commit is contained in:
avollkopf 2023-04-16 17:56:00 +02:00
parent 639efe72c4
commit 9f2f4c87c7
3 changed files with 2 additions and 3 deletions

View file

@ -1,3 +1,3 @@
__version__ = "4.1.8.a13"
__version__ = "4.1.8.a14"
__codename__ = "Groundhog Day"

View file

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

View file

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