mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-21 16:00:26 +01:00
chore: eslint no-var, vars-on-top
This commit is contained in:
committed by
Julian Lam
parent
b56d9e12b5
commit
dab3b23575
@@ -1,7 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = function (module) {
|
||||
var helpers = require('./helpers');
|
||||
const helpers = require('./helpers');
|
||||
|
||||
module.setAdd = async function (key, value) {
|
||||
if (!Array.isArray(value)) {
|
||||
@@ -30,13 +30,13 @@ module.exports = function (module) {
|
||||
key = [key];
|
||||
}
|
||||
|
||||
var batch = module.client.batch();
|
||||
const batch = module.client.batch();
|
||||
key.forEach(k => batch.srem(String(k), value));
|
||||
await helpers.execBatch(batch);
|
||||
};
|
||||
|
||||
module.setsRemove = async function (keys, value) {
|
||||
var batch = module.client.batch();
|
||||
const batch = module.client.batch();
|
||||
keys.forEach(k => batch.srem(String(k), value));
|
||||
await helpers.execBatch(batch);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user