Explorar o código

fix incorrect collection for task search total count

Aneurin Barker Snook hai 1 ano
pai
achega
9616846f6b
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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)