mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-04 21:04:37 +08:00
update auth method config with enabled
This commit is contained in:
parent
6acce31c65
commit
eccebc2850
@ -356,13 +356,16 @@ export const projectsCrudHandlers = createLazyProxy(() => createCrudHandlers(pro
|
||||
},
|
||||
});
|
||||
} else if (!data.config.credential_enabled && passwordAuth) {
|
||||
await tx.authMethodConfig.delete({
|
||||
await tx.authMethodConfig.update({
|
||||
where: {
|
||||
projectConfigId_id: {
|
||||
projectConfigId: oldProject.config.id,
|
||||
id: passwordAuth.authMethodConfigId,
|
||||
},
|
||||
},
|
||||
data: {
|
||||
enabled: false,
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -387,13 +390,16 @@ export const projectsCrudHandlers = createLazyProxy(() => createCrudHandlers(pro
|
||||
},
|
||||
});
|
||||
} else if (!data.config.magic_link_enabled && otpAuth) {
|
||||
await tx.authMethodConfig.delete({
|
||||
await tx.authMethodConfig.update({
|
||||
where: {
|
||||
projectConfigId_id: {
|
||||
projectConfigId: oldProject.config.id,
|
||||
id: otpAuth.authMethodConfigId,
|
||||
},
|
||||
},
|
||||
data: {
|
||||
enabled: false,
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user