mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-12 08:55:47 +01:00
Change post owner (#7752)
* feat: #7749, allow array of keys for setObject * feat: sortedSetRemoveBulk * feat: test for bulk remove * feat: #7083, ability to change post ownership * feat: #7083, fix tid:<tid>:posters * feat: #7083, front end * fix: #7752, psql methods * fix: add missing await * fix: maybe psql
This commit is contained in:
committed by
GitHub
parent
5b746d53e7
commit
53e1b349ae
@@ -34,4 +34,13 @@ module.exports = function (redisClient, module) {
|
||||
keys.forEach(k => batch.zremrangebyscore(k, min, max));
|
||||
await helpers.execBatch(batch);
|
||||
};
|
||||
|
||||
module.sortedSetRemoveBulk = async function (data) {
|
||||
if (!Array.isArray(data) || !data.length) {
|
||||
return;
|
||||
}
|
||||
const batch = redisClient.batch();
|
||||
data.forEach(item => batch.zrem(item[0], item[1]));
|
||||
await helpers.execBatch(batch);
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user