mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-14 08:34:07 -08:00
fix(editor): Make submit in ChangePasswordView work again (#11227)
This commit is contained in:
parent
949e2fd67e
commit
4eb905ab29
|
@ -47,12 +47,7 @@ const getMfaEnabled = () => {
|
||||||
return router.currentRoute.value.query.mfaEnabled === 'true' ? true : false;
|
return router.currentRoute.value.query.mfaEnabled === 'true' ? true : false;
|
||||||
};
|
};
|
||||||
|
|
||||||
const isFormWithMFAToken = (values: { [key: string]: string }): values is { mfaToken: string } => {
|
|
||||||
return 'mfaToken' in values;
|
|
||||||
};
|
|
||||||
|
|
||||||
const onSubmit = async (values: { [key: string]: string }) => {
|
const onSubmit = async (values: { [key: string]: string }) => {
|
||||||
if (!isFormWithMFAToken(values)) return;
|
|
||||||
try {
|
try {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
const token = getResetToken();
|
const token = getResetToken();
|
||||||
|
|
Loading…
Reference in a new issue