Validate config JSON body shape

This commit is contained in:
Dymas
2026-05-16 11:48:01 +02:00
parent 839154aa5c
commit 68fdc99bbd
6 changed files with 17 additions and 4 deletions
+1 -1
View File
@@ -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)