fix: harden Polygon operation validation
This commit is contained in:
@@ -80,6 +80,9 @@ def create_instance():
|
||||
service_id = body.get("serviceId")
|
||||
display_name = body.get("displayName", "unnamed")
|
||||
|
||||
if not isinstance(display_name, str):
|
||||
return jsonify({"error": "displayName must be a string"}), 400
|
||||
|
||||
# Валидация: serviceId обязателен
|
||||
if service_id is None:
|
||||
return jsonify({"error": "serviceId is required"}), 400
|
||||
|
||||
Reference in New Issue
Block a user