generator-aristos
Version:
create aristos cms fast with yeoman generator.
18 lines (17 loc) • 457 B
JavaScript
const Page = require("../../page");
/* Aristos Logger Path */
const addErrorEvent = require("../../../../AristosStuff/AristosLogger/AristosLogger")
.addError;
/**
* Counts the pages in the Pages collection.
* @return {promise} A promise that resolves with the count
*/
module.exports = () => {
return Page.estimatedDocumentCount({})
.then(c => {
return c;
})
.catch(err => {
addErrorEvent(err, "page query error");
});
};