fix(teamsbot): credential save when form visible, add debugMode merge
Made-with: Cursor
This commit is contained in:
parent
294710b415
commit
24de648252
1 changed files with 4 additions and 2 deletions
|
|
@ -127,8 +127,10 @@ export const TeamsbotDashboardView: React.FC = () => {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// userAccount with new credentials: always save to DB (backend loads from there)
|
// userAccount with new/unsaved credentials: save to DB before starting
|
||||||
if (joinMode === 'userAccount' && showCredentialForm && credEmail && credPassword) {
|
const needsSave = joinMode === 'userAccount' && !userAccount?.hasSavedCredentials && credEmail && credPassword;
|
||||||
|
const needsUpdate = joinMode === 'userAccount' && showCredentialForm && credEmail && credPassword;
|
||||||
|
if (needsSave || needsUpdate) {
|
||||||
try {
|
try {
|
||||||
setSavingCredentials(true);
|
setSavingCredentials(true);
|
||||||
await teamsbotApi.saveUserAccount(instanceId, credEmail, credPassword);
|
await teamsbotApi.saveUserAccount(instanceId, credEmail, credPassword);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue