diff --git a/packages/api-v2/.env.development b/packages/api-v2/.env.development index 8f932b0df..b371db3ce 100644 --- a/packages/api-v2/.env.development +++ b/packages/api-v2/.env.development @@ -5,10 +5,11 @@ POSTGRES_PASSWORD=graduatenu POSTGRES_DATABASE=dev JWT_SECRET_KEY=chungusdevs # 1 day in milliseconds (1000 x 60 x 60 x 24) -JWT_EXPIRE_TIME=86400000 +JWT_EXPIRE_TIME='86400s' PORT=3001 NODE_ENV=development -JWT_EXPIRE_TIME_EMAIL=21600 +# 15 minutes in milliseconds +JWT_EXPIRE_TIME_EMAIL='900s' EMAIL_CONFIRMATION_URL=http://localhost:3002/confirmEmail EMAIL_SERVICE=gmail EMAIL_USER=[insert email from notion] diff --git a/packages/api-v2/src/email/email.module.ts b/packages/api-v2/src/email/email.module.ts index f83673f3f..29317a561 100644 --- a/packages/api-v2/src/email/email.module.ts +++ b/packages/api-v2/src/email/email.module.ts @@ -13,7 +13,7 @@ import { EmailConfirmationController } from "src/emailConfirmation/emailConfirma JwtModule.register({ secret: process.env.JWT_SECRET_KEY, signOptions: { - expiresIn: process.env.JWT_EXPIRE_TIME, + expiresIn: process.env.JWT_EXPIRE_TIME_EMAIL, }, }), ], diff --git a/packages/frontend-v2/utils/plan/preAndCoReqCheck.ts b/packages/frontend-v2/utils/plan/preAndCoReqCheck.ts index bcbb7a0bf..c1695d30c 100644 --- a/packages/frontend-v2/utils/plan/preAndCoReqCheck.ts +++ b/packages/frontend-v2/utils/plan/preAndCoReqCheck.ts @@ -14,7 +14,7 @@ import { } from "@graduate/common"; export const getCoReqWarnings = ( - schedule: Schedule2, + schedule: Schedule2 ): CoReqWarnings => { const errors: CoReqWarnings = { type: "coreq", @@ -30,7 +30,7 @@ export const getCoReqWarnings = ( }; export const getCoReqWarningsSem = ( - term: ScheduleTerm2, + term: ScheduleTerm2 ): TermError => { const seen: Set = new Set(); const coReqErrors: TermError = {}; @@ -62,8 +62,8 @@ export const getPreReqWarnings = ( spring: getPreReqWarningSem(year.spring, seen), summer1: getPreReqWarningSem(year.summer1, seen), summer2: getPreReqWarningSem(year.summer2, seen), - })) - } + })), + }; return preReqErrors; }; @@ -135,8 +135,6 @@ const isOrCourse = (course: INEUReq): course is INEUOrReq => { return (course as INEUOrReq).type === "or"; }; -const isError = ( - error: INEUReqError | undefined -): error is INEUReqError => { +const isError = (error: INEUReqError | undefined): error is INEUReqError => { return !!error; };