[www] lib store changed: added total

This commit is contained in:
Roman Timashev committed 2017-10-15 02:12:05 +03:00
1 parent 93772c88e7
commit 6d0b94e3ff
1 file changed
+7
+7
View File
@@ -12,5 +12,12 @@ async function findOne(collection, query) {
return collection.findOne(query)
}
async function total(collection, query) {
return collection
.find(query)
.count()
}
exports.find = find
exports.findOne = findOne
exports.total = total