From 3c8229238c9e9f110486966a05ce40cfc7d84f5c Mon Sep 17 00:00:00 2001 From: Fabian Date: Mon, 30 Mar 2020 16:37:12 +0200 Subject: [PATCH] jsonify --- consumer_api/views/consumers_view.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/consumer_api/views/consumers_view.py b/consumer_api/views/consumers_view.py index 5f0c6f5..d8d9fa1 100644 --- a/consumer_api/views/consumers_view.py +++ b/consumer_api/views/consumers_view.py @@ -8,4 +8,4 @@ class ConsumersView(FlaskView): def get(self): consumer_list = json.loads((redis_client.get("consumer_list") or b"{}").decode('utf-8')) - return [v['ip'] for k, v in consumer_list.items()] + return jsonify([v['ip'] for k, v in consumer_list.items()])