fix(13): WR-06 read result.status (not result.state) in testConnection to reflect actual server field name

This commit is contained in:
curo1305
2026-06-23 00:30:01 +02:00
parent 60df8552b5
commit b1a9f436c4
+3 -1
View File
@@ -251,7 +251,9 @@ export const useCloudConnectionsStore = defineStore('cloudConnections', () => {
async function testConnection(id) {
try {
const result = await api.testCloudConnection(id)
const state = result?.state ?? 'unknown'
// WR-06: server returns { status: ... }, not { state: ... }. Translate at the
// store boundary — internal vocabulary uses `state` but the API field is `status`.
const state = result?.status ?? 'unknown'
setConnectionHealth(id, { state, ...result })
// Clear pending retest flag for this connection
const next = new Set(pendingHealthRetest.value)