From 4416a61a77109666ff54e12aaf259347217d93df Mon Sep 17 00:00:00 2001 From: Sudhanva-Nadiger <93595710+Sudhanva-Nadiger@users.noreply.github.com> Date: Thu, 16 Feb 2023 15:39:12 +0530 Subject: [PATCH] fix: reset password bug (#7135) * fix: reset password bug * add suggested changes --- app/actions/remote/session.ts | 2 +- app/screens/forgot_password/index.tsx | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/app/actions/remote/session.ts b/app/actions/remote/session.ts index 68108e03b0..69b042de2a 100644 --- a/app/actions/remote/session.ts +++ b/app/actions/remote/session.ts @@ -245,7 +245,7 @@ export const sendPasswordResetEmail = async (serverUrl: string, email: string) = return {error}; } return { - data: response.data, + status: response.status, error: undefined, }; }; diff --git a/app/screens/forgot_password/index.tsx b/app/screens/forgot_password/index.tsx index a997e254e3..2b6e95236a 100644 --- a/app/screens/forgot_password/index.tsx +++ b/app/screens/forgot_password/index.tsx @@ -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; }