mirror of
https://github.com/PiBrewing/craftbeerpi4.git
synced 2024-11-21 22:48:16 +01:00
changed api get all config parameters
This commit is contained in:
parent
639efe72c4
commit
9f2f4c87c7
3 changed files with 2 additions and 3 deletions
|
@ -1,3 +1,3 @@
|
|||
__version__ = "4.1.8.a13"
|
||||
__version__ = "4.1.8.a14"
|
||||
__codename__ = "Groundhog Day"
|
||||
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue