diff --git a/backend/services/browser_service.go b/backend/services/browser_service.go index ded2c8a..caeb4fe 100644 --- a/backend/services/browser_service.go +++ b/backend/services/browser_service.go @@ -1673,8 +1673,10 @@ func (b *browserService) RemoveStreamValues(connName string, db int, k any, IDs } resp.Success = true - resp.Data = map[string]any{ - "affected": affected, + resp.Data = struct { + Affected int64 `json:"affected"` + }{ + Affected: affected, } return } diff --git a/frontend/src/components/new_value/NewStreamValue.vue b/frontend/src/components/new_value/NewStreamValue.vue index 7c41f3f..4888a8f 100644 --- a/frontend/src/components/new_value/NewStreamValue.vue +++ b/frontend/src/components/new_value/NewStreamValue.vue @@ -43,7 +43,7 @@ defineExpose({ - + includes(entries, k)) - tab.length -= size(removedElems) - break - - case 'set': // []string - tab.value = tab.value || [] - tab.length -= size(remove(tab.value, ({ v }) => includes(entries, v))) + for (const k of entries) { + for (let i = 0; i < tab.value.length; i++) { + if (tab.value[i].k === k) { + tab.value.splice(i, 1) + tab.length -= 1 + break + } + } + } break + case 'set': // string[] case 'zset': // string[] tab.value = tab.value || [] - tab.length -= size(remove(tab.value, ({ v }) => includes(entries, v))) + for (const v of entries) { + for (let i = 0; i < tab.value.length; i++) { + if (tab.value[i].v === v) { + tab.value.splice(i, 1) + tab.length -= 1 + break + } + } + } break case 'stream': // string[] tab.value = tab.value || [] - tab.length -= size(remove(tab.value, ({ v }) => includes(entries, v))) + for (const id of entries) { + for (let i = 0; i < tab.value.length; i++) { + if (tab.value[i].id === id) { + tab.value.splice(i, 1) + tab.length -= 1 + break + } + } + } break } },