mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-25 00:07:47 +01:00
chore(1-3293): fix some method impls
This commit is contained in:
parent
b6bb7bcc9d
commit
9d0f9647e9
@ -96,7 +96,7 @@ export class TrafficDataUsageStore implements ITrafficDataUsageStore {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async getDailyTrafficDataUsageForPeriod(
|
async getDailyTrafficDataForPeriod(
|
||||||
from: Date,
|
from: Date,
|
||||||
to: Date,
|
to: Date,
|
||||||
): Promise<IStatTrafficUsage[]> {
|
): Promise<IStatTrafficUsage[]> {
|
||||||
@ -107,7 +107,7 @@ export class TrafficDataUsageStore implements ITrafficDataUsageStore {
|
|||||||
return rows.map(mapRow);
|
return rows.map(mapRow);
|
||||||
}
|
}
|
||||||
|
|
||||||
async getMonthlyTrafficDataUsageForPeriod(
|
async getMonthlyTrafficDataForPeriod(
|
||||||
from: Date,
|
from: Date,
|
||||||
to: Date,
|
to: Date,
|
||||||
): Promise<IStatMonthlyTrafficUsage[]> {
|
): Promise<IStatMonthlyTrafficUsage[]> {
|
||||||
@ -143,7 +143,7 @@ export class TrafficDataUsageStore implements ITrafficDataUsageStore {
|
|||||||
period: string,
|
period: string,
|
||||||
): Promise<IStatTrafficUsage[]> {
|
): Promise<IStatTrafficUsage[]> {
|
||||||
const month = new Date(period);
|
const month = new Date(period);
|
||||||
return this.getDailyTrafficDataUsageForPeriod(
|
return this.getDailyTrafficDataForPeriod(
|
||||||
startOfMonth(month),
|
startOfMonth(month),
|
||||||
endOfMonth(month),
|
endOfMonth(month),
|
||||||
);
|
);
|
||||||
@ -155,6 +155,6 @@ export class TrafficDataUsageStore implements ITrafficDataUsageStore {
|
|||||||
): Promise<IStatMonthlyTrafficUsage[]> {
|
): Promise<IStatMonthlyTrafficUsage[]> {
|
||||||
const to = endOfMonth(new Date());
|
const to = endOfMonth(new Date());
|
||||||
const from = startOfMonth(subMonths(to, monthsBack));
|
const from = startOfMonth(subMonths(to, monthsBack));
|
||||||
return this.getMonthlyTrafficDataUsageForPeriod(from, to);
|
return this.getMonthlyTrafficDataForPeriod(from, to);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user