format
This commit is contained in:
1 parent
396d5b369b
commit
7f1c996632
1 file changed
+11
-9
@@ -205,15 +205,17 @@ class MongoChecksRepository implements IChecksRepository {
|
|||||||
const { id, metadata, ...rest } = check;
|
const { id, metadata, ...rest } = check;
|
||||||
return {
|
return {
|
||||||
_id: id ? new mongoose.Types.ObjectId(id) : new mongoose.Types.ObjectId(),
|
_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),
|
monitorId: new mongoose.Types.ObjectId(metadata.monitorId),
|
||||||
type: metadata.type,
|
teamId: new mongoose.Types.ObjectId(metadata.teamId),
|
||||||
} : {
|
type: metadata.type,
|
||||||
monitorId: new mongoose.Types.ObjectId(),
|
}
|
||||||
teamId: new mongoose.Types.ObjectId(),
|
: {
|
||||||
type: "http",
|
monitorId: new mongoose.Types.ObjectId(),
|
||||||
},
|
teamId: new mongoose.Types.ObjectId(),
|
||||||
|
type: "http",
|
||||||
|
},
|
||||||
...rest,
|
...rest,
|
||||||
} as unknown as CheckDocument;
|
} as unknown as CheckDocument;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in new issue
Block a user