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