[www] lib store changed: added total
This commit is contained in:
1 parent
93772c88e7
commit
6d0b94e3ff
1 file changed
+7
@@ -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
|
||||
Reference in new issue
Block a user