fix(mail): clear lastConnectError on successful re-connect
Wenn User App-Passwort aktualisiert via /api/mail/connect (upsert), waren bisher lastConnectError + lastConnectErrorAt von der vorherigen Auth-Failure noch in DB → /api/mail/status returned weiter Auth-Fehler-Status bis zum nächsten IDLE-Heartbeat oder Cron-Scan diese überschrieb. Jetzt: bei erfolgreichem Update räumt upsertMailConnection beide Felder, UI zeigt sofort "Live" nach Passwort-Update. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
86445d8607
commit
2d0983d6c8
@ -51,6 +51,10 @@ export async function upsertMailConnection(data: {
|
|||||||
rejectUnauthorized: data.rejectUnauthorized ?? true,
|
rejectUnauthorized: data.rejectUnauthorized ?? true,
|
||||||
useStarttls: data.useStarttls ?? false,
|
useStarttls: data.useStarttls ?? false,
|
||||||
isActive: true,
|
isActive: true,
|
||||||
|
// Bei Re-Connect (z.B. neues App-Passwort): alte Error-Spuren clearen,
|
||||||
|
// damit UI sofort wieder "Live" zeigt — IDLE-daemon übernimmt.
|
||||||
|
lastConnectError: null,
|
||||||
|
lastConnectErrorAt: null,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user