fix: database issue with KBKV update

This commit is contained in:
KernelDeimos 2024-12-16 16:24:19 -05:00
parent 7f036223f6
commit 7ba1b7656b

View File

@ -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 ]
);