1
0
Просмотр исходного кода

fix incorrect collection for task search total count

Aneurin Barker Snook 1 год назад
Родитель
Сommit
9616846f6b
1 измененных файлов с 1 добавлено и 1 удалено
  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)