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,
|
||||
to: Date,
|
||||
): Promise<IStatTrafficUsage[]> {
|
||||
@ -107,7 +107,7 @@ export class TrafficDataUsageStore implements ITrafficDataUsageStore {
|
||||
return rows.map(mapRow);
|
||||
}
|
||||
|
||||
async getMonthlyTrafficDataUsageForPeriod(
|
||||
async getMonthlyTrafficDataForPeriod(
|
||||
from: Date,
|
||||
to: Date,
|
||||
): Promise<IStatMonthlyTrafficUsage[]> {
|
||||
@ -143,7 +143,7 @@ export class TrafficDataUsageStore implements ITrafficDataUsageStore {
|
||||
period: string,
|
||||
): Promise<IStatTrafficUsage[]> {
|
||||
const month = new Date(period);
|
||||
return this.getDailyTrafficDataUsageForPeriod(
|
||||
return this.getDailyTrafficDataForPeriod(
|
||||
startOfMonth(month),
|
||||
endOfMonth(month),
|
||||
);
|
||||
@ -155,6 +155,6 @@ export class TrafficDataUsageStore implements ITrafficDataUsageStore {
|
||||
): Promise<IStatMonthlyTrafficUsage[]> {
|
||||
const to = endOfMonth(new Date());
|
||||
const from = startOfMonth(subMonths(to, monthsBack));
|
||||
return this.getMonthlyTrafficDataUsageForPeriod(from, to);
|
||||
return this.getMonthlyTrafficDataForPeriod(from, to);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user