mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-31 00:16:47 +01:00
fix: correct name order -> traffic usage data -> traffic data usage (#9156)
Correcting a slight oversight from when we created the new methods. This brings the name in line with the other store methods.
This commit is contained in:
parent
85ae6f3b95
commit
ab3531dd51
@ -92,7 +92,7 @@ export class FakeTrafficDataUsageStore implements ITrafficDataUsageStore {
|
||||
return Object.values(data);
|
||||
}
|
||||
|
||||
async getDailyTrafficUsageDataForPeriod(
|
||||
async getDailyTrafficDataUsageForPeriod(
|
||||
from: Date,
|
||||
to: Date,
|
||||
): Promise<IStatTrafficUsage[]> {
|
||||
@ -101,7 +101,7 @@ export class FakeTrafficDataUsageStore implements ITrafficDataUsageStore {
|
||||
);
|
||||
}
|
||||
|
||||
async getMonthlyTrafficUsageDataForPeriod(
|
||||
async getMonthlyTrafficDataUsageForPeriod(
|
||||
from: Date,
|
||||
to: Date,
|
||||
): Promise<IStatMonthlyTrafficUsage[]> {
|
||||
|
@ -27,11 +27,11 @@ export interface ITrafficDataUsageStore
|
||||
getTrafficDataForMonthRange(
|
||||
monthsBack: number,
|
||||
): Promise<IStatMonthlyTrafficUsage[]>;
|
||||
getDailyTrafficUsageDataForPeriod(
|
||||
getDailyTrafficDataUsageForPeriod(
|
||||
from: Date,
|
||||
to: Date,
|
||||
): Promise<IStatTrafficUsage[]>;
|
||||
getMonthlyTrafficUsageDataForPeriod(
|
||||
getMonthlyTrafficDataUsageForPeriod(
|
||||
from: Date,
|
||||
to: Date,
|
||||
): Promise<IStatMonthlyTrafficUsage[]>;
|
||||
|
@ -96,7 +96,7 @@ export class TrafficDataUsageStore implements ITrafficDataUsageStore {
|
||||
});
|
||||
}
|
||||
|
||||
async getDailyTrafficUsageDataForPeriod(
|
||||
async getDailyTrafficDataUsageForPeriod(
|
||||
from: Date,
|
||||
to: Date,
|
||||
): Promise<IStatTrafficUsage[]> {
|
||||
@ -107,7 +107,7 @@ export class TrafficDataUsageStore implements ITrafficDataUsageStore {
|
||||
return rows.map(mapRow);
|
||||
}
|
||||
|
||||
async getMonthlyTrafficUsageDataForPeriod(
|
||||
async getMonthlyTrafficDataUsageForPeriod(
|
||||
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.getDailyTrafficUsageDataForPeriod(
|
||||
return this.getDailyTrafficDataUsageForPeriod(
|
||||
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.getMonthlyTrafficUsageDataForPeriod(from, to);
|
||||
return this.getMonthlyTrafficDataUsageForPeriod(from, to);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user