Rename methods
This commit is contained in:
1 parent
56aa7b3e1a
commit
3bdfe5567d
1 file changed
+4
-7
@@ -522,10 +522,7 @@ class MonitorService implements IMonitorService {
|
|||||||
return {};
|
return {};
|
||||||
};
|
};
|
||||||
|
|
||||||
private getEmbedChecksRecent = async (
|
private getChecksRecent = async (monitor: MonitorEntity, startDate: Date) => {
|
||||||
monitor: MonitorEntity,
|
|
||||||
startDate: Date
|
|
||||||
) => {
|
|
||||||
const endDate = new Date();
|
const endDate = new Date();
|
||||||
const matchStage: {
|
const matchStage: {
|
||||||
"metadata.monitorId": mongoose.Types.ObjectId;
|
"metadata.monitorId": mongoose.Types.ObjectId;
|
||||||
@@ -636,7 +633,7 @@ class MonitorService implements IMonitorService {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
private getEmbedChecksOtherRanges = async (
|
private getChecksOtherRanges = async (
|
||||||
monitor: MonitorEntity,
|
monitor: MonitorEntity,
|
||||||
range: string,
|
range: string,
|
||||||
startDate: Date
|
startDate: Date
|
||||||
@@ -732,9 +729,9 @@ class MonitorService implements IMonitorService {
|
|||||||
const startDate = getStartDate(range);
|
const startDate = getStartDate(range);
|
||||||
|
|
||||||
if (range === "24h" || range === "7d" || range === "30d") {
|
if (range === "24h" || range === "7d" || range === "30d") {
|
||||||
return await this.getEmbedChecksOtherRanges(monitor, range, startDate);
|
return await this.getChecksOtherRanges(monitor, range, startDate);
|
||||||
} else {
|
} else {
|
||||||
return await this.getEmbedChecksRecent(monitor, startDate);
|
return await this.getChecksRecent(monitor, startDate);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user