Add network requests and validation

This commit is contained in:
Alex Holliday committed 2024-09-05 12:16:29 -07:00
1 parent cec8ecd985
commit 9eaab0da1a
6 files changed
+63 -16

No files matched your search

+4 -2
View File
@@ -311,19 +311,21 @@ const getMonitorsAndSummaryByTeamId = async (teamId, type) => {
}
if (monitor.status === false) {
acc.up += 1;
acc.down += 1;
}
if (monitor.isActive === false) {
acc.paused += 1;
}
return acc;
},
{ up: 0, down: 0, paused: 0 }
);
console.log(monitorCounts);
monitorCounts.total = monitors.length;
return { monitors, monitorCounts };
} catch (error) {
error.methodName = "getMonitorsAndSummaryByTeamId";
error.method = "getMonitorsAndSummaryByTeamId";
throw error;
}
};