From ae7f9aa9cb867fecf8cbdf1638a6c8dcc908aea5 Mon Sep 17 00:00:00 2001 From: Eddy Chen <89349085+ecxyzzy@users.noreply.github.com> Date: Wed, 31 Jan 2024 11:49:24 -0800 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20grades=20queries=20for=20?= =?UTF-8?q?department=20codes=20with=20spaces?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/api/src/routes/v1/rest/grades/{id}/lib.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/api/src/routes/v1/rest/grades/{id}/lib.ts b/apps/api/src/routes/v1/rest/grades/{id}/lib.ts index 9bb4a096..779ba5b0 100644 --- a/apps/api/src/routes/v1/rest/grades/{id}/lib.ts +++ b/apps/api/src/routes/v1/rest/grades/{id}/lib.ts @@ -145,7 +145,7 @@ export function constructPrismaQuery(parsedQuery: Query): Prisma.GradesSectionWh year, quarter, instructors: { some: { name: { contains: instructor, mode: "insensitive" } } }, - department: department?.toUpperCase(), + department: department?.replace(/ /g, "").toUpperCase(), courseNumber: courseNumber?.toUpperCase(), courseNumeric, sectionCode,