From 7c642df18b8d6c585164bc579ec8c3cbf710e48a Mon Sep 17 00:00:00 2001 From: Yash Maheshwari Date: Wed, 13 Dec 2023 18:14:24 +0530 Subject: [PATCH] Improved: forgot password api endpoint and updated translation for success message(#63) --- src/locales/en.json | 2 +- src/services/UserService.ts | 2 +- src/views/ForgotPassword.vue | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/locales/en.json b/src/locales/en.json index ccbc45e..24b9c20 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -25,5 +25,5 @@ "Username": "Username", "Username or Email cannot be empty, please fill both the fields.": "Username or Email cannot be empty, please fill both the fields.", "Your password should be at least 5 characters long, it should contain at least one number, one alphabet and one from following special characters: !@#$%^&*.": "Your password should be at least 5 characters long, it should contain at least one number, one alphabet and one from following special characters: !@#$%^&*.", - "Your request for reset password has been processed. Please check your email for further instructions.": "Your request for reset password has been processed. Please check your email {email}, for further instructions." + "Your request for reset password has been processed. Please check your email, for further instructions.": "Your request for reset password has been processed. Please check your email {email}, for further instructions." } \ No newline at end of file diff --git a/src/services/UserService.ts b/src/services/UserService.ts index 82413e3..9ffe43b 100644 --- a/src/services/UserService.ts +++ b/src/services/UserService.ts @@ -50,7 +50,7 @@ const resetPassword = async(params: any) : Promise => { const forgotPassword = async(params: any) : Promise => { return api({ - url: "/sendResetPassword", + url: "/sendResetPasswordMail", method: "post", data: params }) diff --git a/src/views/ForgotPassword.vue b/src/views/ForgotPassword.vue index dae1d58..1a89842 100644 --- a/src/views/ForgotPassword.vue +++ b/src/views/ForgotPassword.vue @@ -27,7 +27,7 @@ - {{ $t(successMessage) }} + {{ successMessage }} {{ $t('Login') }} @@ -108,7 +108,7 @@ export default defineComponent({ const resp = await UserService.forgotPassword(params); if(!hasError(resp)) { - this.successMessage = `Your request for reset password has been processed. Please check your email ${this.email}, for further instructions.` + this.successMessage = this.$t('Your request for reset password has been processed. Please check your email, for further instructions.', { email: this.email }) } else { this.errorMessage = resp.data._ERROR_MESSAGE_ }