forked from UKSOURCE/cms.lams
chore(controllers): disable json file writing on page content updates
Disable the automatic writing of data to JSON files in `createPageContentController`, `admissionsController`, and `policiesController` to prevent redundant file system operations during updates.
This commit is contained in:
@@ -75,11 +75,11 @@ function createPageContentController({
|
||||
});
|
||||
}
|
||||
|
||||
const finalData = await model
|
||||
.findOne()
|
||||
.select("-_id -__v -createdAt -updatedAt")
|
||||
.lean();
|
||||
jsonHelper.writeJsonFile(editorConfig.dataFile, finalData);
|
||||
// const finalData = await model
|
||||
// .findOne()
|
||||
// .select("-_id -__v -createdAt -updatedAt")
|
||||
// .lean();
|
||||
// jsonHelper.writeJsonFile(editorConfig.dataFile, finalData);
|
||||
|
||||
req.flash("success_msg", `${editorConfig.title} updated successfully`);
|
||||
return req.session.save(() =>
|
||||
|
||||
Reference in New Issue
Block a user