Merge pull request #673 from bluewave-labs/fix/be/normalization
Parsed mongo doc correctly in Normalization function, resolves #672
This commit is contained in:
2 files changed
+1
-2
No files matched your search
@@ -263,7 +263,6 @@ const getMonitorStatsById = async (req) => {
|
||||
monitorStats.latestResponseTime = getLatestResponseTime(checksAll);
|
||||
monitorStats.incidents = incidents;
|
||||
monitorStats.checks = dateRangeChecks;
|
||||
|
||||
return monitorStats;
|
||||
} catch (error) {
|
||||
throw error;
|
||||
|
||||
@@ -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 };
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user