From a9beb9dbff223eb169c76f11fd79255c445f1f82 Mon Sep 17 00:00:00 2001 From: Eddy Chen <89349085+ecxyzzy@users.noreply.github.com> Date: Thu, 7 Mar 2024 13:40:27 -0800 Subject: [PATCH] =?UTF-8?q?fix(websoc):=20=F0=9F=90=9B=20correct=20fullCou?= =?UTF-8?q?rses=20options?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/api/src/routes/v1/rest/websoc/lib.ts | 8 ++++---- libs/uc-irvine-lib/src/websoc/index.ts | 2 +- packages/types/types/constants.ts | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/api/src/routes/v1/rest/websoc/lib.ts b/apps/api/src/routes/v1/rest/websoc/lib.ts index 6b0bb28b..b2ddf725 100644 --- a/apps/api/src/routes/v1/rest/websoc/lib.ts +++ b/apps/api/src/routes/v1/rest/websoc/lib.ts @@ -141,16 +141,16 @@ export function constructPrismaQuery(parsedQuery: Query): Prisma.WebsocSectionWh if (parsedQuery.fullCourses && parsedQuery.fullCourses !== "ANY") { switch (parsedQuery.fullCourses) { case "FullOnly": - AND.push({ sectionFull: true, waitlistFull: true }); + AND.push({ sectionFull: true }, { waitlistFull: true }); break; - case "OverEnrolled": + case "Overenrolled": AND.push({ overEnrolled: true }); break; case "SkipFull": - AND.push({ sectionFull: true, waitlistFull: false }); + AND.push({ sectionFull: false }); break; case "SkipFullWaitlist": - AND.push({ sectionFull: false, waitlistFull: false }); + AND.push({ sectionFull: true }, { waitlistFull: false }); } } diff --git a/libs/uc-irvine-lib/src/websoc/index.ts b/libs/uc-irvine-lib/src/websoc/index.ts index e11aa80e..f276b27d 100644 --- a/libs/uc-irvine-lib/src/websoc/index.ts +++ b/libs/uc-irvine-lib/src/websoc/index.ts @@ -133,7 +133,7 @@ export const fullCoursesOptions = [ "SkipFull", "SkipFullWaitlist", "FullOnly", - "OverEnrolled", + "Overenrolled", ] as const; /** diff --git a/packages/types/types/constants.ts b/packages/types/types/constants.ts index fe4e6c00..04229ed4 100644 --- a/packages/types/types/constants.ts +++ b/packages/types/types/constants.ts @@ -26,7 +26,7 @@ export const fullCoursesOptions = [ "SkipFull", "SkipFullWaitlist", "FullOnly", - "OverEnrolled", + "Overenrolled", ] as const; /** * The list of options for filtering cancelled courses.