Skip to content

Commit

Permalink
easy
Browse files Browse the repository at this point in the history
  • Loading branch information
0-don committed Feb 9, 2024
1 parent 6780fe2 commit 3285d46
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"build": "nest build",
"dev": "nest start --watch",
"dev:prod": "cross-env NODE_ENV=production nest start --watch",
"start": "npx prisma migrate deploy && npx prisma db seed && cross-env NODE_ENV=production node dist/src/main.js",
"start": "npx prisma migrate deploy && cross-env NODE_ENV=production npx prisma db seed && cross-env NODE_ENV=production node dist/src/main.js",
"lint": "eslint \"src/**/*.ts\" --fix",
"format": "prettier -w \"src/**/*.ts\"",
"typecheck": "tsc --noEmit --incremental false",
Expand Down
5 changes: 4 additions & 1 deletion server/prisma/seed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import isoWeek from "dayjs/plugin/isoWeek";
import isoWeeksInYear from "dayjs/plugin/isoWeeksInYear";
import utc from "dayjs/plugin/utc";
import weekOfYear from "dayjs/plugin/weekOfYear";
import "dotenv/config";
import { readFileSync } from "fs";
import { join, resolve } from "path";
import {
Expand Down Expand Up @@ -166,7 +167,9 @@ const seedUserMeals = async () => {
.startOf("week");

const days = Array.from({ length: 7 }, (_, i) =>
startOfWeek.add(i, "day").toISOString(),
startOfWeek
.add(i + process.env.NODE_ENV === "production" ? 0 : 1, "day")
.toISOString(),
);
const weekDay = DAYFIELDS[index];
const mealId = weeklyMealGroup[weekDay];
Expand Down

0 comments on commit 3285d46

Please sign in to comment.