From a54cdbc23873e5785485b4e8caf416de0142d0b5 Mon Sep 17 00:00:00 2001 From: Pinapelz Date: Tue, 18 Feb 2025 21:59:17 -0800 Subject: chore: refactor group endpoint to use better kv names --- app.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'app.py') diff --git a/app.py b/app.py index aed990b..83d1003 100644 --- a/app.py +++ b/app.py @@ -188,10 +188,10 @@ def get_channel_information(channel_name): @app.route("/api/groups") def api_groups(): group_mappings = {} - for key, value in member_groups.items(): - if value not in group_mappings: - group_mappings[value] = [] - group_mappings[value].append(key) + for name, group in member_groups.items(): + if group not in group_mappings: + group_mappings[group] = [] + group_mappings[group].append(name) return jsonify(group_mappings) @app.errorhandler(404) -- cgit v1.2.3