Validate config JSON body shape
This commit is contained in:
+1
-1
@@ -214,7 +214,7 @@ class Handler(BaseHTTPRequestHandler):
|
||||
try:
|
||||
self.ensure_client_access()
|
||||
if parsed.path == "/api/config":
|
||||
self.update_config(self.body_json())
|
||||
Handler.update_config(self, Handler.require_json_object(self, self.body_json()))
|
||||
elif parsed.path == "/api/queue":
|
||||
runtime = Handler._runtime(self)
|
||||
self.json(runtime["download_queue"].add(self.body_json()), HTTPStatus.CREATED)
|
||||
|
||||
Reference in New Issue
Block a user