mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-17 19:21:04 +01:00
feat: allow removing multiple items from list
This commit is contained in:
@@ -94,7 +94,11 @@ RETURNING A."array"[array_length(A."array", 1)] v`,
|
||||
if (!key) {
|
||||
return;
|
||||
}
|
||||
|
||||
// TODO: remove all values with one query
|
||||
if (Array.isArray(value)) {
|
||||
await Promise.all(value.map(v => module.listRemoveAll(key, v)));
|
||||
return;
|
||||
}
|
||||
await module.pool.query({
|
||||
name: 'listRemoveAll',
|
||||
text: `
|
||||
|
||||
Reference in New Issue
Block a user