Make channel stats in /api/servers a dictionary

This commit is contained in:
jesopo 2018-11-27 13:24:38 +00:00
parent ab60012cbe
commit 7df55305ca

View file

@ -59,7 +59,8 @@ class Module(ModuleManager.BaseModule):
"users": len(server.users), "users": len(server.users),
"bytes-written": server.bytes_written, "bytes-written": server.bytes_written,
"bytes-read": server.bytes_read, "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") @utils.hook("api.get.servers")