'path' is now 'args'
This commit is contained in:
parent
d609bfb16d
commit
956cc86072
1 changed files with 4 additions and 4 deletions
|
@ -88,8 +88,8 @@ class Module(ModuleManager.BaseModule):
|
|||
|
||||
@utils.hook("api.get.servers")
|
||||
def servers_api(self, event):
|
||||
if event["path"]:
|
||||
server_id = event["path"][0]
|
||||
if event["args"]:
|
||||
server_id = event["args"][0]
|
||||
if not server_id.isdigit():
|
||||
return None
|
||||
server_id = int(server_id)
|
||||
|
@ -118,8 +118,8 @@ class Module(ModuleManager.BaseModule):
|
|||
}
|
||||
@utils.hook("api.get.channels")
|
||||
def channels_api(self, event):
|
||||
if event["path"]:
|
||||
server_id = event["path"][0]
|
||||
if event["args"]:
|
||||
server_id = event["args"][0]
|
||||
if not server_id.isdigit():
|
||||
return None
|
||||
server_id = int(server_id)
|
||||
|
|
Loading…
Reference in a new issue