fix TS errors, add missing tests

This commit is contained in:
Alex Holliday committed 2026-04-10 12:33:08 -07:00
1 parent b515d688f4
commit 4d1af5e2b4
4 files changed
+62

No files matched your search

@@ -263,6 +263,10 @@ export class MonitorService implements IMonitorService {
type: monitor.type,
});
if (checksData.monitorType !== "hardware") {
throw new AppError({ message: "Unable to load hardware stats for this monitor", status: 500 });
}
const stats = {
aggregateData: checksData.aggregateData,
upChecks: checksData.upChecks,
@@ -301,6 +305,10 @@ export class MonitorService implements IMonitorService {
type: monitor.type,
});
if (checksData.monitorType !== "pagespeed") {
throw new AppError({ message: "Unable to load pagespeed stats for this monitor", status: 500 });
}
const monitorStats = await this.monitorStatsRepository.findByMonitorId(monitor.id);
return {