From e968de9e44c71819a8cbeb6e952a9171dbd18d22 Mon Sep 17 00:00:00 2001 From: Jerome Hurley <24437988+VonSwirl@users.noreply.github.com> Date: Wed, 18 Jul 2018 10:05:33 +0100 Subject: [PATCH] fix Deprecation Count --- lib/mongoose-datatables.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mongoose-datatables.js b/lib/mongoose-datatables.js index 59a7d4f..dc8ff58 100644 --- a/lib/mongoose-datatables.js +++ b/lib/mongoose-datatables.js @@ -79,7 +79,7 @@ function dataTablesPlugin (schema, options) { } Promise - .all([query.exec(), thisSchema.count(find)]) + .all([query.exec(), thisSchema.countDocuments(find)]) .then(function (results) { var response = {} response[totalKey] = results[1]