diff options
| author | 2018-11-27 13:24:38 +0000 | |
|---|---|---|
| committer | 2018-11-27 13:24:38 +0000 | |
| commit | 7df55305ca0ba1b89c9ba7ce76a28d95dd02c572 (patch) | |
| tree | dbfb217c2884968afbb1b0bf0eb3b6b91a441f05 | |
| parent | Add channel stats to /api/servers (diff) | |
| signature | ||
Make channel stats in /api/servers a dictionary
| -rw-r--r-- | modules/stats.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/stats.py b/modules/stats.py index 279e6593..a5e8bea9 100644 --- a/modules/stats.py +++ b/modules/stats.py @@ -59,7 +59,8 @@ class Module(ModuleManager.BaseModule): "users": len(server.users), "bytes-written": server.bytes_written, "bytes-read": server.bytes_read, - "channels": [self._channel_stats(c) for c in server.channels] + "channels": { + c.name: self._channel_stats(c) for c in server.channels} } @utils.hook("api.get.servers") |
