'path' is now 'args'

This commit is contained in:
jesopo 2019-09-20 13:34:55 +01:00
parent d609bfb16d
commit 956cc86072

View file

@ -88,8 +88,8 @@ class Module(ModuleManager.BaseModule):
@utils.hook("api.get.servers") @utils.hook("api.get.servers")
def servers_api(self, event): def servers_api(self, event):
if event["path"]: if event["args"]:
server_id = event["path"][0] server_id = event["args"][0]
if not server_id.isdigit(): if not server_id.isdigit():
return None return None
server_id = int(server_id) server_id = int(server_id)
@ -118,8 +118,8 @@ class Module(ModuleManager.BaseModule):
} }
@utils.hook("api.get.channels") @utils.hook("api.get.channels")
def channels_api(self, event): def channels_api(self, event):
if event["path"]: if event["args"]:
server_id = event["path"][0] server_id = event["args"][0]
if not server_id.isdigit(): if not server_id.isdigit():
return None return None
server_id = int(server_id) server_id = int(server_id)