aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/rest_api.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/rest_api.py b/modules/rest_api.py
index 2f39da78..dfdb0746 100644
--- a/modules/rest_api.py
+++ b/modules/rest_api.py
@@ -23,8 +23,10 @@ class Handler(http.server.BaseHTTPRequestHandler):
if parsed.path.startswith("/api/"):
_, _, endpoint = parsed.path[1:].partition("/")
endpoint, _, args = endpoint.partition("/")
+ args = list(filter(None, args.split("/")))
+
response = _events.on("api").on(endpoint).call_for_result(
- params=get_params, path=args.split("/"))
+ params=get_params, path=args)
if response:
response = json.dumps(response, sort_keys=True,