Fixed adding zset key

This commit is contained in:
Stela Augustinova
2025-12-18 16:26:32 +01:00
parent 6905e4a2a1
commit 90316f106a

View File

@@ -75,21 +75,16 @@
});
}
} else if (type === 'zset' && item.records && Array.isArray(item.records)) {
const pairs = [];
item.records.forEach(record => {
for (const record of item.records) {
if (record.member && record.score) {
pairs.push(record.score, record.member);
}
});
if (pairs.length > 0) {
await apiCall('database-connections/call-method', {
conid,
database,
method: typeConfig.addMethod,
args: [keyName, ...pairs],
args: [keyName, record.member, parseFloat(record.score)],
});
}
}
} else if (type === 'stream' && item.records && Array.isArray(item.records)) {
for (const record of item.records) {
if (record.value) {