From 7115ae46d23b6cc4e1245d1119a286f895c3bba6 Mon Sep 17 00:00:00 2001 From: Eddy Chen <89349085+ecxyzzy@users.noreply.github.com> Date: Mon, 18 Nov 2024 12:12:19 -0800 Subject: [PATCH] fix: ge search --- apps/backend/src/routers/websoc.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/backend/src/routers/websoc.ts b/apps/backend/src/routers/websoc.ts index 28477abac..ad8a5db1f 100644 --- a/apps/backend/src/routers/websoc.ts +++ b/apps/backend/src/routers/websoc.ts @@ -14,7 +14,11 @@ function sanitizeSearchParams(params: Record) { } } if ('department' in params) { - params.department = params.department.toUpperCase(); + if (params.department.toUpperCase() === 'ALL') { + delete params.department; + } else { + params.department = params.department.toUpperCase(); + } } if ('courseNumber' in params) { params.courseNumber = params.courseNumber.toUpperCase();