mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-30 10:35:55 +01:00
more fixes
This commit is contained in:
@@ -233,26 +233,22 @@ SocketAdmin.plugins.toggle = function(socket, plugin_id) {
|
||||
SocketAdmin.config = {};
|
||||
|
||||
SocketAdmin.config.get = function(socket, data, callback) {
|
||||
meta.configs.list(function(err, config) {
|
||||
if (!err) {
|
||||
callback(config);
|
||||
}
|
||||
});
|
||||
meta.configs.list(callback);
|
||||
};
|
||||
|
||||
SocketAdmin.config.set = function(socket, data, callback) {
|
||||
meta.configs.set(data.key, data.value, function(err) {
|
||||
if (!err) {
|
||||
callback({
|
||||
status: 'ok'
|
||||
});
|
||||
|
||||
plugins.fireHook('action:config.set', {
|
||||
key: data.key,
|
||||
value: data.value
|
||||
});
|
||||
if(err) {
|
||||
return callback(err);
|
||||
}
|
||||
|
||||
callback(null);
|
||||
|
||||
plugins.fireHook('action:config.set', {
|
||||
key: data.key,
|
||||
value: data.value
|
||||
});
|
||||
|
||||
logger.monitorConfig({io: index.server}, data);
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user