generator-aristos
Version:
create aristos cms fast with yeoman generator.
19 lines (18 loc) • 715 B
JavaScript
const fs = require("fs-extra");
const Documentations = fs.readJSONSync(
"./expansion/upgrade/documentation-builder/routes/checkers/documentationModelRoutes.json"
).route;
const Documentation = require(Documentations);
/* Aristos Logger Path */
const errorAddEvent = require("../../../../../../important/AristosStuff/AristosLogger/AristosLogger")
.addError;
/**
* Deletes a single documentation from the Documentation collection
* @param {objectID} _id - The ID of the page to delete.
* @return {promise} A promise that resolves when the record is deleted
*/
module.exports = _id => {
return Documentation.findByIdAndRemove(_id).catch(err => {
errorAddEvent(err, "documentation query error");
});
};