From 7ba1b7656b5e24375cad639b9a8e37577b526c09 Mon Sep 17 00:00:00 2001 From: KernelDeimos Date: Mon, 16 Dec 2024 16:24:19 -0500 Subject: [PATCH] fix: database issue with KBKV update --- src/backend/src/services/DBKVService.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/backend/src/services/DBKVService.js b/src/backend/src/services/DBKVService.js index 52370b61..149b4bf4 100644 --- a/src/backend/src/services/DBKVService.js +++ b/src/backend/src/services/DBKVService.js @@ -39,7 +39,8 @@ class DBKVService extends BaseService { `SELECT kkey, value FROM kv WHERE user_id=? AND app=? AND kkey_hash IN (?)`, [ user.id, app.uid, key_hashes ] ) : await this.db.read( - `SELECT kkey, value FROM kv WHERE user_id=? AND (app IS NULL OR app = 'global') AND kkey_hash IN (?)`, + `SELECT kkey, value FROM kv WHERE user_id=? AND (app IS NULL OR app = 'global') ` + + `AND kkey_hash IN (${key_hashes.map(() => '?').join(',')})`, [ user.id, key_hashes ] );