Skip to content

Commit b2b49ff

Browse files
xyspgchenxin-yan
andauthored
fix(server): too many documents (#104)
Co-authored-by: Chenxin Yan <[email protected]>
1 parent ed88d19 commit b2b49ff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/server/convex/courseOfferings.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ export const getCourseOfferings = protectedQuery({
120120
.eq("term", term)
121121
.eq("year", year),
122122
)
123-
.collect(),
123+
.take(300),
124124
ctx.db
125125
.query("courseOfferings")
126126
.withSearchIndex("search_course_code", (q) =>
@@ -130,7 +130,7 @@ export const getCourseOfferings = protectedQuery({
130130
.eq("term", term)
131131
.eq("year", year),
132132
)
133-
.collect(),
133+
.take(300),
134134
]);
135135

136136
const combinedMap = new Map<string, Doc<"courseOfferings">>();

0 commit comments

Comments
 (0)