Merge pull request #673 from bluewave-labs/fix/be/normalization

Parsed mongo doc correctly in Normalization function, resolves #672
This commit is contained in:
Alexander Holliday authored and GitHub committed 2024-08-19 19:06:52 -07:00
commit 3ca76f9b48
2 files changed
+1 -2

No files matched your search

-1
View File
@@ -263,7 +263,6 @@ const getMonitorStatsById = async (req) => {
monitorStats.latestResponseTime = getLatestResponseTime(checksAll);
monitorStats.incidents = incidents;
monitorStats.checks = dateRangeChecks;
return monitorStats;
} catch (error) {
throw 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 };
});
}
};