add dateRange to checks query

This commit is contained in:
Alex Holliday committed 2026-01-27 20:46:28 +00:00
1 parent 0af7cfe714
commit 63d2bb97ee
8 files changed
+19 -13

No files matched your search

+2 -1
View File
@@ -66,7 +66,8 @@ class CheckController {
getChecksSummaryByTeamId = async (req: Request, res: Response, next: NextFunction) => {
try {
const summary = await this.checkService.getChecksSummaryByTeamId({ teamId: req?.user?.teamId });
const dateRange = req.query?.dateRange || "hour";
const summary = await this.checkService.getChecksSummaryByTeamId({ teamId: req?.user?.teamId, dateRange });
return res.status(200).json({
success: true,
msg: "Checks summary retrieved successfully",