Skip to content
This repository has been archived by the owner on Oct 18, 2024. It is now read-only.

Commit

Permalink
fix(websoc): 🐛 correct fullCourses options (#139)
Browse files Browse the repository at this point in the history
  • Loading branch information
ecxyzzy authored Mar 8, 2024
1 parent 2c69776 commit f10a02a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions apps/api/src/routes/v1/rest/websoc/lib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
}
}

Expand Down
2 changes: 1 addition & 1 deletion libs/uc-irvine-lib/src/websoc/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ export const fullCoursesOptions = [
"SkipFull",
"SkipFullWaitlist",
"FullOnly",
"OverEnrolled",
"Overenrolled",
] as const;

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/types/types/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const fullCoursesOptions = [
"SkipFull",
"SkipFullWaitlist",
"FullOnly",
"OverEnrolled",
"Overenrolled",
] as const;
/**
* The list of options for filtering cancelled courses.
Expand Down

0 comments on commit f10a02a

Please sign in to comment.