This commit is contained in:
eson 2023-09-05 16:23:19 +08:00
parent 1e266c3a56
commit 0d19c8b4d1
2 changed files with 6 additions and 1 deletions

View File

@ -117,6 +117,11 @@ button:hover {
</form>
</div>
<div id="messageContainer">
<p id="successMessage" class="message success"></p>
<p id="errorMessage" class="message error"></p>
</div>
<script>
function resetPassword() {
const new_password = document.getElementById("new_password").value;

View File

@ -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{}
err := tx.Where("id = ?", user.Id).Take(user).Error
err := tx.Model(user).Where("id = ?", rt.UserId).Take(user).Error
if err != nil {
logx.Error(err)
return err