fix: test connection passing auth instead of password

- testConnection now maps auth -> password for Redis service
- fixes test connection failing even with correct credentials
This commit is contained in:
2026-07-04 19:52:30 +08:00
parent 10b3e1ec94
commit 4075f20c07
4 changed files with 14 additions and 4 deletions
+7 -1
View File
@@ -128,7 +128,13 @@ export const useConnectionStore = defineStore('connection', () => {
}): Promise<{ success: boolean; error?: string }> {
const testId = `test_${Date.now()}`
try {
const result = await window.electronAPI.redis.connect(testId, opts)
const result = await window.electronAPI.redis.connect(testId, {
host: opts.host,
port: opts.port,
password: opts.auth || undefined,
username: opts.username || undefined,
tls: opts.tls,
})
if (result.success) {
await window.electronAPI.redis.disconnect(testId)
return { success: true }