From 2d0053b1e5b36b4b27220c4f3fde8ee81e4afe2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20David=20Guti=C3=A9rrez?= Date: Mon, 4 Dec 2023 09:20:06 +0100 Subject: [PATCH] fix(monitoring): manage API host entries --- plugins/main/server/start/monitoring/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/main/server/start/monitoring/index.ts b/plugins/main/server/start/monitoring/index.ts index 4bed7d0e08..ca87b5121e 100644 --- a/plugins/main/server/start/monitoring/index.ts +++ b/plugins/main/server/start/monitoring/index.ts @@ -384,8 +384,8 @@ async function getHostsConfiguration(context) { try { const hosts = await context.wazuh_core.serverAPIHostEntries.getHostsEntries(); - if (hosts.body.length) { - return hosts.body; + if (hosts.length) { + return hosts; } context.wazuh.logger.debug('There are no API host entries yet');