1
0
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:
Thomas Heartman 2025-01-27 11:20:04 +01:00 committed by GitHub
parent 85ae6f3b95
commit ab3531dd51
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 8 additions and 8 deletions

View File

@ -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[]> {

View File

@ -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[]>;

View File

@ -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);
}
}