forked from Ivasoft/mattermost-mobile
fix: reset password bug (#7135)
* fix: reset password bug * add suggested changes
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user