From bf613fdd4cbc6b318d5564fb8562f5722fe7c063 Mon Sep 17 00:00:00 2001 From: Jet Li Date: Fri, 5 Jul 2024 21:04:54 +0800 Subject: [PATCH] Enable multi-lan for system notification when resetting password in frontend --- .../src/pages/guest/SigninWithEmailAndPassword.vue | 14 +++++--------- frontend/src/utils/backend/userAuth.js | 5 +++-- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/frontend/src/pages/guest/SigninWithEmailAndPassword.vue b/frontend/src/pages/guest/SigninWithEmailAndPassword.vue index 0fe0ac0..9cba252 100644 --- a/frontend/src/pages/guest/SigninWithEmailAndPassword.vue +++ b/frontend/src/pages/guest/SigninWithEmailAndPassword.vue @@ -5,13 +5,8 @@
- +
@@ -50,7 +45,7 @@ export default { components: {}, - created() {}, + created() { }, mounted() { if (this.mnx_IsKeepUserSignedIn() && this.mnx_isUserAuthenticated()) { this.mnx_navAfterSignedin() @@ -89,7 +84,7 @@ export default { }, forgetPassword() { - UserAuthApi.resetPasswordThroughEmail(this.email) + UserAuthApi.resetPasswordThroughEmail(this.email, window.location.host) .then((response) => { let signinAction = response.data.action switch (signinAction) { @@ -117,6 +112,7 @@ export default { color: #916ad4; margin: 0; } + .btn-forget-password { @extend .btn; // @extend .ms-1; diff --git a/frontend/src/utils/backend/userAuth.js b/frontend/src/utils/backend/userAuth.js index 0503f98..15f5f8c 100644 --- a/frontend/src/utils/backend/userAuth.js +++ b/frontend/src/utils/backend/userAuth.js @@ -14,11 +14,12 @@ class UserAuthApi { return request } - static resetPasswordThroughEmail(email) { + static resetPasswordThroughEmail(email, host) { const request = backendAxios.post( '/api/user/signin/reset-password-through-email', { - email: email + email: email, + host: host }, {} )