Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

periodicjs.core.controller

Package Overview
Dependencies
Maintainers
2
Versions
170
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

periodicjs.core.controller - npm Package Compare versions

Comparing version 4.0.3 to 4.0.4

56

lib/controller.js

@@ -752,3 +752,59 @@ /*

Controller.prototype.updateMultipleModel = function(options){
logger.warn('cached documents not clearing and revisions on multple documents not saved');
var model = options.model,
// id = options.id,
updatequery = options.updatequery,
updateattributes = options.updateattributes,
req = options.req,
res = options.res,
callback = options.callback,
successredirect = options.successredirect,
// originalrevision = options.originalrevision,
// appendid = options.appendid,
responseData = {};//,
// updateOperation,
// cached = (typeof options.cached === 'boolean' && options.cached===true) && true,
// useCacheTest = (useCache && global.CoreCache && cached && req.headers.periodicCache!=='no-periodic-cache');
model.update(updatequery, updateattributes, { multi: true }, function (err, numAffected) {
if (err) {
if (callback) {
callback(err, null);
}
else {
this.handleDocumentQueryErrorResponse({
err: err,
errorflash: err.message,
res: res,
req: req
});
}
}
else {
if (callback) {
callback(null, numAffected);
}
else if (req.query.format === 'json' || req.params.ext === 'json') {
req.flash('success', 'Saved');
responseData.result = 'success';
responseData.data = {
numAffected: numAffected
};
responseData.data.flash_messages = req.flash();
res.send(responseData);
}
else {
req.flash('success', 'Saved');
res.redirect(successredirect);
}
// if(useCacheTest){
// updatedoc.id = id;
// clearModelDocCache({model:model,doc:updatedoc,req:req});
// }
}
});
};
/**

@@ -755,0 +811,0 @@ * short hand mongoose update document query

2

package.json
{
"name": "periodicjs.core.controller",
"description": "Customizable CMS platform",
"version": "4.0.3",
"version": "4.0.4",
"main": "index.js",

@@ -6,0 +6,0 @@ "engines": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc