Browse Source

changing fn of setDate to addDays for better code readability

pull/2332/head
Rafael Claudio 2 years ago
committed by Thomas
parent
commit
892baac1d5
  1. 6
      apps/api/src/services/data-gathering/data-gathering.processor.ts

6
apps/api/src/services/data-gathering/data-gathering.processor.ts

@ -18,7 +18,8 @@ import {
getMonth,
getYear,
isBefore,
parseISO
parseISO,
addDays
} from 'date-fns';
import { DataGatheringService } from './data-gathering.service';
@ -101,8 +102,7 @@ export class DataGatheringProcessor {
});
}
// Count month one up for iteration
currentDate.setDate(currentDate.getDate() + 1);
currentDate = addDays(currentDate, 1);
}
await this.marketDataService.updateMany({ data });

Loading…
Cancel
Save