Validate watchlist add JSON body shape
This commit is contained in:
+1
-1
@@ -242,7 +242,7 @@ class Handler(BaseHTTPRequestHandler):
|
||||
self.json(actions[action](job_id))
|
||||
elif parsed.path in {"/api/watchlist", "/api/watchlist/add"}:
|
||||
Handler._runtime(self)
|
||||
result = Handler._context(self).add_to_watchlist(self.body_json())
|
||||
result = Handler._context(self).add_to_watchlist(Handler.require_json_object(self, self.body_json()))
|
||||
status = HTTPStatus.CREATED if result.get("created") else HTTPStatus.OK
|
||||
self.json(result, status)
|
||||
elif parsed.path == "/api/watchlist/ensure-thumbnails":
|
||||
|
||||
Reference in New Issue
Block a user