MCP refactor

Signed-off-by: GitHub <noreply@github.com>
This commit is contained in:
Jokob @NetAlertX
2025-12-07 08:37:55 +00:00
committed by GitHub
parent 8c982cd476
commit 5d1c63375b
3 changed files with 4 additions and 6 deletions

View File

@@ -418,7 +418,7 @@ def api_devices_search():
if is_mac(query):
device_data = get_device_data(query)
if device_data:
if device_data.status_code == 200:
return jsonify({"success": True, "devices": [device_data.get_json()]})
else:
return jsonify({"success": False, "error": "Device not found"}), 404
@@ -574,7 +574,7 @@ def api_trigger_scan():
@app.route('/mcp/sse/openapi.json', methods=['GET'])
def api_openapi_spec():
if not is_authorized():
return jsonify({"Success": False, "error": "Unauthorized"}), 401
return jsonify({"success": False, "error": "Unauthorized"}), 401
return openapi_spec()