GroupedChecks
This commit is contained in:
1 parent
cdc58e5905
commit
3182141d0a
14 files changed
+592
-62
No files matched your search
@@ -707,7 +707,25 @@ class MonitorService implements IMonitorService {
|
||||
if (range === "24h" || range === "7d" || range === "30d") {
|
||||
return await this.getChecksOtherRanges(monitor, range, startDate);
|
||||
} else {
|
||||
return await this.getChecksRecent(monitor, startDate);
|
||||
const checks = await this.checksRepository.findRecentChecksByMonitor(
|
||||
monitor,
|
||||
startDate
|
||||
);
|
||||
|
||||
const stats = await MonitorStats.findOne({
|
||||
monitorId: monitor.id,
|
||||
});
|
||||
|
||||
if (!stats) {
|
||||
throw new ApiError("Monitor stats not found", 404);
|
||||
}
|
||||
|
||||
return {
|
||||
checks,
|
||||
monitor,
|
||||
stats,
|
||||
};
|
||||
// return await this.getChecksRecent(monitor, startDate);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user