Browse Source

Migrate from "in" to "gte" and "lt"

pull/3393/head
Thomas Kaul 1 year ago
parent
commit
3f6d99b753
  1. 13
      apps/api/src/app/portfolio/current-rate.service.mock.ts

13
apps/api/src/app/portfolio/current-rate.service.mock.ts

@ -1,6 +1,12 @@
import { parseDate, resetHours } from '@ghostfolio/common/helper'; import { parseDate, resetHours } from '@ghostfolio/common/helper';
import { addDays, endOfDay, isBefore, isSameDay } from 'date-fns'; import {
addDays,
eachDayOfInterval,
endOfDay,
isBefore,
isSameDay
} from 'date-fns';
import { GetValueObject } from './interfaces/get-value-object.interface'; import { GetValueObject } from './interfaces/get-value-object.interface';
import { GetValuesObject } from './interfaces/get-values-object.interface'; import { GetValuesObject } from './interfaces/get-values-object.interface';
@ -97,7 +103,10 @@ export const CurrentRateServiceMock = {
} }
} }
} else { } else {
for (const date of dateQuery.in) { for (const date of eachDayOfInterval({
end: dateQuery.lt,
start: dateQuery.gte
})) {
for (const dataGatheringItem of dataGatheringItems) { for (const dataGatheringItem of dataGatheringItems) {
values.push({ values.push({
date, date,

Loading…
Cancel
Save