🐛 Fix werkzeug 2.1 compatibility and remove redundant code (#4630)
See #4629
This commit is contained in:
1 parent
b133eea894
commit
05ea0b29a4
8 files changed
+6
-69
No files matched your search
@@ -396,14 +396,8 @@ def printerCommand():
|
||||
if not printer.is_operational():
|
||||
abort(409, description="Printer is not operational")
|
||||
|
||||
if "application/json" not in request.headers["Content-Type"]:
|
||||
abort(400, description="Expected content type JSON")
|
||||
|
||||
data = request.get_json()
|
||||
|
||||
if data is None:
|
||||
abort(400, description="Malformed JSON body in request")
|
||||
|
||||
if "command" in data and "commands" in data:
|
||||
abort(400, description="'command' and 'commands' are mutually exclusive")
|
||||
elif ("command" in data or "commands" in data) and "script" in data:
|
||||
|
||||
Reference in new issue
Block a user