This commit is contained in:
Alex Holliday committed 2026-01-28 20:21:41 +00:00
1 parent 396d5b369b
commit 7f1c996632
1 file changed
+4 -2
@@ -205,11 +205,13 @@ class MongoChecksRepository implements IChecksRepository {
const { id, metadata, ...rest } = check;
return {
_id: id ? new mongoose.Types.ObjectId(id) : new mongoose.Types.ObjectId(),
metadata: metadata ? {
metadata: metadata
? {
monitorId: new mongoose.Types.ObjectId(metadata.monitorId),
teamId: new mongoose.Types.ObjectId(metadata.teamId),
type: metadata.type,
} : {
}
: {
monitorId: new mongoose.Types.ObjectId(),
teamId: new mongoose.Types.ObjectId(),
type: "http",