Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
PluginInstanceHandler.updateTitle(req, {en_US: body["title.en_US"]}, body.pageId, body.ns, function (err, result) {
var json = {};
that.setJSON(req, json);
if (err) {
json.err = err.message;
}
if (result) {
json.status = "success";
json.title = {
en_US: body["title.en_US"]
}
}
next(err);
});
}
function updatePluginTitle(req, res, next) {
var that = this, DBActionsLib = that.getDBActionsLib(), db = that.getDB(), params = req.params,
ns = params.pluginNS, pageId = params.pageId;
var body = req.body;
PluginInstanceHandler.updateTitle(req, {en_US: body["title.en_US"]}, body.pageId, body.ns, function (err, result) {
var json = {};
that.setJSON(req, json);
if (err) {
json.err = err.message;
}
if (result) {
json.status = "success";
json.title = {
en_US: body["title.en_US"]
}
}
next(err);
});
}