NodeBB will now fire hooks if a config setting changes

v1.18.x
Julian Lam 11 years ago
parent cc78f6f155
commit d69847c54e

@ -666,10 +666,17 @@ module.exports.init = function(io) {
socket.on('api:config.set', function(data) {
meta.configs.set(data.key, data.value, function(err) {
if (!err) socket.emit('api:config.set', {
status: 'ok'
});
/* Another hook, for my (adarqui's) logger module */
if (!err) {
socket.emit('api:config.set', {
status: 'ok'
});
plugins.fireHook('action:config.set', {
key: data.key,
value: data.value
});
}
logger.monitorConfig(this, data);
});
});

Loading…
Cancel
Save