Parsed mongo doc correctly in Normalization function

This commit is contained in:
Alex Holliday committed 2024-08-19 10:02:12 -07:00
1 parent b94d93e276
commit 6d3ed27f31
3 files changed
+1 -3

No files matched your search

-1
View File
@@ -260,7 +260,6 @@ const getMonitorStatsById = async (req) => {
monitorStats.latestResponseTime = getLatestResponseTime(checksAll);
monitorStats.incidents = incidents;
monitorStats.checks = dateRangeChecks;
return monitorStats;
} catch (error) {
console.log(error);
+1 -1
View File
@@ -40,7 +40,7 @@ const NormalizeData = (checks, rangeMin, rangeMax) => {
return normalizedChecks;
} else {
return checks.map((check) => {
return { ...check, originalResponseTime: check.responseTime };
return { ...check._doc, originalResponseTime: check.responseTime };
});
}
};