From ebdbd91874d9a829fd10ddcae7b4bba15bfdb7e8 Mon Sep 17 00:00:00 2001
From: eson <9673575+githubcontent@user.noreply.gitee.com>
Date: Tue, 5 Sep 2023 16:08:01 +0800
Subject: [PATCH] fix
---
fs_template/get_reset_password_html.tpl | 11 ++++-------
server/auth/internal/logic/userresetpasswordlogic.go | 2 +-
2 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/fs_template/get_reset_password_html.tpl b/fs_template/get_reset_password_html.tpl
index 014d7386..95a5917d 100644
--- a/fs_template/get_reset_password_html.tpl
+++ b/fs_template/get_reset_password_html.tpl
@@ -1,16 +1,13 @@
-Subject: Password Reset
-
-Request for Your {{ .CompanyName }} Account
+Subject: Password Reset Request for Your {{ .CompanyName }} Account
Dear {{ .UserName }},
We have received your request to reset the password for your {{ .CompanyName }} account.
-Please click the button below to confirm your new password:
+To proceed with the password reset, please click the button below to open the Reset Password page:
-Open ResetPassword Page
-
-This password reset confirmation link will expire in 60 minutes. Please let us know if you have any other questions!
+
+Please note that this password reset confirmation link will expire in 60 minutes. If you have any further questions, feel free to reach out to us.
Regards,
{{ .SenderName }}
diff --git a/server/auth/internal/logic/userresetpasswordlogic.go b/server/auth/internal/logic/userresetpasswordlogic.go
index 067bdb3d..9d1a5151 100644
--- a/server/auth/internal/logic/userresetpasswordlogic.go
+++ b/server/auth/internal/logic/userresetpasswordlogic.go
@@ -56,7 +56,7 @@ func (l *UserResetPasswordLogic) UserResetPassword(req *types.RequestUserResetPa
err = l.svcCtx.AllModels.FsUser.Transaction(l.ctx, func(tx *gorm.DB) error {
user := &gmodel.FsUser{Id: int64(rt.UserId)}
- err := tx.Take(user).Error
+ err := tx.Model(user).Take(user).Error
if err != nil {
return err
}