periodicjs.core.data
Advanced tools
Comparing version 0.6.1 to 0.6.2
@@ -143,3 +143,3 @@ 'use strict'; | ||
return new Promisie((resolve, reject) => { | ||
_QUERY.call(this, { query: {}, limit: false }, (err, total) => { | ||
_QUERY.call(this, { query, limit: false }, (err, total) => { | ||
if (err) reject(err); | ||
@@ -176,3 +176,3 @@ else resolve(total.length); | ||
collection_count: result.count, | ||
collection_pages: Math.ceil(result.count / pagelength) | ||
collection_pages: Math.ceil(result.count / ((pagelength <= limit) ? pagelength : limit)) | ||
})); | ||
@@ -179,0 +179,0 @@ }) |
@@ -107,5 +107,5 @@ 'use strict'; | ||
return new Promisie((resolve, reject) => { | ||
_QUERY.call(this, { query: {}, limit: false }, (err, total) => { | ||
Model.count(query, (err, count) => { | ||
if (err) reject(err); | ||
else resolve(total.length); | ||
else resolve(count); | ||
}); | ||
@@ -140,3 +140,3 @@ }); | ||
collection_count: result.count, | ||
collection_pages: Math.ceil(result.count / pagelength) | ||
collection_pages: Math.ceil(result.count / ((pagelength <= limit) ? pagelength : limit)) | ||
})); | ||
@@ -143,0 +143,0 @@ }) |
@@ -189,3 +189,3 @@ 'use strict'; | ||
return new Promisie((resolve, reject) => { | ||
_QUERY.call(this, { query: {}, limit: false }, (err, total) => { | ||
_QUERY.call(this, { query, limit: false }, (err, total) => { | ||
if (err) reject(err); | ||
@@ -223,3 +223,3 @@ else resolve(total.length); | ||
collection_count: result.count, | ||
collection_pages: Math.ceil(result.count / pagelength) | ||
collection_pages: Math.ceil(result.count / ((pagelength <= limit) ? pagelength : limit)) | ||
})); | ||
@@ -226,0 +226,0 @@ }) |
@@ -97,4 +97,4 @@ { | ||
}, | ||
"version": "0.6.1", | ||
"version": "0.6.2", | ||
"license": "MIT" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1856305