mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-17 03:01:08 +01:00
chore: eslint no-restricted-syntax
This commit is contained in:
committed by
Julian Lam
parent
115d19e289
commit
5c2f0f0557
@@ -32,15 +32,10 @@ Config.setMultiple = async function (socket, data) {
|
||||
}
|
||||
});
|
||||
await meta.configs.setMultiple(data);
|
||||
for (const field in data) {
|
||||
if (data.hasOwnProperty(field)) {
|
||||
const setting = {
|
||||
key: field,
|
||||
value: data[field],
|
||||
};
|
||||
plugins.hooks.fire('action:config.set', setting);
|
||||
logger.monitorConfig({ io: index.server }, setting);
|
||||
}
|
||||
for (const [key, value] of Object.entries(data)) {
|
||||
const setting = { key, value };
|
||||
plugins.hooks.fire('action:config.set', setting);
|
||||
logger.monitorConfig({ io: index.server }, setting);
|
||||
}
|
||||
if (Object.keys(changes).length) {
|
||||
changes.type = 'config-change';
|
||||
|
||||
Reference in New Issue
Block a user