map fields
This commit is contained in:
1 parent
858aecce62
commit
7d3abb3f98
2 files changed
+7
-1
No files matched your search
@@ -14,7 +14,7 @@ const getBaseDefaults = (data?: Monitor | null) => ({
|
|||||||
notifications: data?.notifications || [],
|
notifications: data?.notifications || [],
|
||||||
statusWindowSize: data?.statusWindowSize || 5,
|
statusWindowSize: data?.statusWindowSize || 5,
|
||||||
statusWindowThreshold: data?.statusWindowThreshold || 60,
|
statusWindowThreshold: data?.statusWindowThreshold || 60,
|
||||||
geoCheckEnabled: data?.geoCheckEnabled || false,
|
geoCheckEnabled: data?.geoCheckEnabled ?? false,
|
||||||
geoCheckLocations: data?.geoCheckLocations || [],
|
geoCheckLocations: data?.geoCheckLocations || [],
|
||||||
geoCheckInterval: data?.geoCheckInterval || 300000,
|
geoCheckInterval: data?.geoCheckInterval || 300000,
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -354,6 +354,9 @@ class MongoMonitorsRepository implements IMonitorsRepository {
|
|||||||
gameId: doc.gameId ?? undefined,
|
gameId: doc.gameId ?? undefined,
|
||||||
group: doc.group ?? null,
|
group: doc.group ?? null,
|
||||||
recentChecks: (doc.recentChecks ?? []).map((check: any) => this.toCheckSnapshot(check)),
|
recentChecks: (doc.recentChecks ?? []).map((check: any) => this.toCheckSnapshot(check)),
|
||||||
|
geoCheckEnabled: doc.geoCheckEnabled ?? false,
|
||||||
|
geoCheckLocations: doc.geoCheckLocations ?? [],
|
||||||
|
geoCheckInterval: doc.geoCheckInterval ?? 300000,
|
||||||
createdAt: toDateString(doc.createdAt),
|
createdAt: toDateString(doc.createdAt),
|
||||||
updatedAt: toDateString(doc.updatedAt),
|
updatedAt: toDateString(doc.updatedAt),
|
||||||
};
|
};
|
||||||
@@ -409,6 +412,9 @@ class MongoMonitorsRepository implements IMonitorsRepository {
|
|||||||
gameId: doc.gameId ?? undefined,
|
gameId: doc.gameId ?? undefined,
|
||||||
group: doc.group ?? null,
|
group: doc.group ?? null,
|
||||||
recentChecks: (doc.recentChecks ?? []).map((check: any) => this.toCheckSnapshot(check)),
|
recentChecks: (doc.recentChecks ?? []).map((check: any) => this.toCheckSnapshot(check)),
|
||||||
|
geoCheckEnabled: doc.geoCheckEnabled ?? false,
|
||||||
|
geoCheckLocations: doc.geoCheckLocations ?? [],
|
||||||
|
geoCheckInterval: doc.geoCheckInterval ?? 300000,
|
||||||
createdAt: toDateString(doc.createdAt),
|
createdAt: toDateString(doc.createdAt),
|
||||||
updatedAt: toDateString(doc.updatedAt),
|
updatedAt: toDateString(doc.updatedAt),
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in new issue
Block a user