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