fix: reset password bug (#7135)
* fix: reset password bug * add suggested changes
This commit is contained in:
parent
77b0851213
commit
4416a61a77
2 changed files with 3 additions and 4 deletions
|
|
@ -245,7 +245,7 @@ export const sendPasswordResetEmail = async (serverUrl: string, email: string) =
|
|||
return {error};
|
||||
}
|
||||
return {
|
||||
data: response.data,
|
||||
status: response.status,
|
||||
error: undefined,
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -136,9 +136,8 @@ const ForgotPassword = ({componentId, serverUrl, theme}: Props) => {
|
|||
return;
|
||||
}
|
||||
|
||||
const {data} = await sendPasswordResetEmail(serverUrl, email);
|
||||
|
||||
if (data) {
|
||||
const {status} = await sendPasswordResetEmail(serverUrl, email);
|
||||
if (status === 'OK') {
|
||||
setIsPasswordLinkSent(true);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue