UNPKG

generator-aristos

Version:

create aristos cms fast with yeoman generator.

17 lines (15 loc) 608 B
const Page = require("../../page"); /* Aristos Logger Path */ const addErrorEvent = require("../../../../AristosStuff/AristosLogger/AristosLogger") .addError; /** * Edits a single page in the Page collection * @param {string} _id - The ID of the page to edit. * @param {object} pageProps - An object with title, slug, content, parent, 100, description, keywords, author * @return {promise} A promise that resolves when the page is edited */ module.exports = (_id, pageProps) => { return Page.findByIdAndUpdate({ _id }, pageProps).catch(err => { addErrorEvent(err, "page query error"); }); };