Skip to content

Commit

Permalink
Improved: forgot password api endpoint and updated translation for su…
Browse files Browse the repository at this point in the history
…ccess message(hotwax#63)
  • Loading branch information
ymaheshwari1 committed Dec 13, 2023
1 parent d9efa47 commit 7c642df
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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."
}
2 changes: 1 addition & 1 deletion src/services/UserService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const resetPassword = async(params: any) : Promise<any> => {

const forgotPassword = async(params: any) : Promise<any> => {
return api({
url: "/sendResetPassword",
url: "/sendResetPasswordMail",
method: "post",
data: params
})
Expand Down
4 changes: 2 additions & 2 deletions src/views/ForgotPassword.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

<ion-item lines="none" v-show="successMessage">
<ion-icon color="success" slot="start" :icon="checkmarkCircleOutline" />
<ion-label class="ion-text-wrap">{{ $t(successMessage) }}</ion-label>
<ion-label class="ion-text-wrap">{{ successMessage }}</ion-label>
</ion-item>
</section>
<ion-button name="loginButton" fill="clear" class="ion-text-center" @click.stop="router.push('/login')">{{ $t('Login') }}</ion-button>
Expand Down Expand Up @@ -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_
}
Expand Down

0 comments on commit 7c642df

Please sign in to comment.