Skip to content

Commit

Permalink
fake data script fix
Browse files Browse the repository at this point in the history
  • Loading branch information
JiashuHarryHuang committed Nov 12, 2023
1 parent 46c4b17 commit 55b02da
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pages/api/scripts/helper-functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,10 @@ export const generateEvent = (
// get the start and end dates
let startDate, endDate;
if (chosenEvent.isMultipleDays) {
startDate = faker.date.future(1);
startDate = faker.date.between(
'2022-01-01T00:00:00.000Z',
'2025-01-01T00:00:00.000Z'
);
endDate = faker.date.future(1, startDate);
} else {
startDate = new Date();
Expand All @@ -122,7 +125,7 @@ export const generateEvent = (
phone: generatePhone(),
email: faker.internet.email(),
program: programIds[0] || null,
requireApplication: chosenEvent.requireApplication,
requireApplication: false,
tags: tagIds,
volunteers: [],
};
Expand Down

0 comments on commit 55b02da

Please sign in to comment.