Change to Pritt print Cache

This commit is contained in:
Manuel83
2017-09-28 07:40:06 +02:00
parent 547804be2b
commit d9e79d0208
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -282,7 +282,7 @@ class CraftBeerPI(object):
self.cache["messages"] = [] self.cache["messages"] = []
self.cache["version"] = "3.1" self.cache["version"] = "3.1"
self.modules = {} self.modules = {}
self.cache["users"] = {'manuel': {'pw': 'secret'}}
self.addon = Addon(self) self.addon = Addon(self)
self.actor = ActorCore(self) self.actor = ActorCore(self)
self.sensor = SensorCore(self) self.sensor = SensorCore(self)
+2 -1
View File
@@ -174,7 +174,8 @@ class SystemView(FlaskView):
200: 200:
description: CraftBeerPi System Cache description: CraftBeerPi System Cache
""" """
return json.dumps(cbpi.cache) return Response(response=json.dumps(cbpi.cache, sort_keys=True, indent=4), status=200, mimetype='application/json')
@cbpi.addon.core.initializer() @cbpi.addon.core.initializer()