check details base

This commit is contained in:
Alex Holliday committed 2025-12-19 15:12:30 -08:00
1 parent d139e0b643
commit 66c406151a
9 files changed
+112 -47

No files matched your search

@@ -33,6 +33,8 @@ export interface ICheckService {
range: string
) => Promise<{ checks: ICheck[]; count: number }>;
getCheckById: (checkId: string, teamId: string) => Promise<ICheck | null>;
cleanupOrphanedChecks: () => Promise<boolean>;
}
@@ -259,6 +261,13 @@ class CheckService implements ICheckService {
]);
return { checks, count };
};
getCheckById = async (checkId: string, teamId: string) => {
return await Check.findOne({
_id: new mongoose.Types.ObjectId(checkId),
"metadata.teamId": new mongoose.Types.ObjectId(teamId),
});
};
}
export default CheckService;