Skip to content

Commit

Permalink
Align 14 month reports with Angular
Browse files Browse the repository at this point in the history
  • Loading branch information
canac committed Sep 13, 2024
1 parent 0712f37 commit a567ac4
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions pages/api/graphql-rest.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
Response,
} from 'apollo-datasource-rest';
import { ApolloServer } from 'apollo-server-micro';
import { DateTime, Duration, Interval } from 'luxon';
import { DateTime } from 'luxon';
import Cors from 'micro-cors';
import {
ExportFormatEnum,
Expand Down Expand Up @@ -443,12 +443,9 @@ class MpdxRestApi extends RESTDataSource {
currencyType === 'salary'
? 'salary_currency_donations'
: 'donor_currency_donations'
}?filter[account_list_id]=${accountListId}${designationAccountFilter}&filter[month_range]=${Interval.before(
DateTime.now().endOf('month'),
Duration.fromObject({ months: 14 }).minus({ day: 1 }),
)
.toISODate()
.replace('/', '...')}`,
}?filter[account_list_id]=${accountListId}${designationAccountFilter}&filter[month_range]=${DateTime.now()
.minus({ months: 13 })
.toISODate()}...${DateTime.now().toISODate()}`,
);
return mapFourteenMonthReport(data, currencyType);
}
Expand Down

0 comments on commit a567ac4

Please sign in to comment.