format
This commit is contained in:
1 parent
396d5b369b
commit
7f1c996632
1 file changed
+4
-2
@@ -205,11 +205,13 @@ 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),
|
monitorId: new mongoose.Types.ObjectId(metadata.monitorId),
|
||||||
teamId: new mongoose.Types.ObjectId(metadata.teamId),
|
teamId: new mongoose.Types.ObjectId(metadata.teamId),
|
||||||
type: metadata.type,
|
type: metadata.type,
|
||||||
} : {
|
}
|
||||||
|
: {
|
||||||
monitorId: new mongoose.Types.ObjectId(),
|
monitorId: new mongoose.Types.ObjectId(),
|
||||||
teamId: new mongoose.Types.ObjectId(),
|
teamId: new mongoose.Types.ObjectId(),
|
||||||
type: "http",
|
type: "http",
|
||||||
|
|||||||
Reference in new issue
Block a user