1
0
Prechádzať zdrojové kódy

fix incorrect collection for task search total count

Aneurin Barker Snook 1 rok pred
rodič
commit
9616846f6b
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  1. 1 1
      src/task/api.ts

+ 1 - 1
src/task/api.ts

@@ -194,7 +194,7 @@ export function searchTasks({ model }: Context): AuthRequestHandler {
 
     try {
       // Get total documents count for filter
-      const totalCount = await model.herd.collection.countDocuments(filter)
+      const totalCount = await model.task.collection.countDocuments(filter)
 
       // Build cursor
       let cursor = model.task.collection.find(filter)