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

Commit

Permalink
refactor: ♻️ add detailed error message for refined type
Browse files Browse the repository at this point in the history
  • Loading branch information
ecxyzzy committed Feb 5, 2024
1 parent 605b2f6 commit 3905388
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions apps/api/src/routes/v1/rest/enrollmentHistory/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ export const QuerySchema = z
(x.department && x.courseNumber) ||
(x.sectionCode && x.year && x.quarter) ||
(x.instructor && x.courseNumber && x.year && x.quarter),
{
message:
"Must provide department and course number; section code and year/quarter; or instructor, course number, and year/quarter",
},
);

export type Query = z.infer<typeof QuerySchema>;

0 comments on commit 3905388

Please sign in to comment.