fix
This commit is contained in:
@@ -53,7 +53,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
|
||||
Handler: UserResetPasswordHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
Method: http.MethodPost,
|
||||
Method: http.MethodGet,
|
||||
Path: "/api/auth/reset/password/html",
|
||||
Handler: UserResetPasswordHtmlHandler(serverCtx),
|
||||
},
|
||||
|
||||
@@ -179,7 +179,6 @@ func (m *EmailSender) Resend(uniqueKey string, content []byte) {
|
||||
|
||||
m.lock.Lock()
|
||||
defer m.lock.Unlock()
|
||||
|
||||
// Check if the email task still exists and has not been sent successfully
|
||||
if task, ok := m.emailSending[uniqueKey]; ok && task.SendTime.Add(m.ResendTimeLimit).After(time.Now().UTC()) {
|
||||
err := smtp.SendMail(task.Email.TargetEmail, m.Auth, m.FromEmail, []string{task.Email.TargetEmail}, content)
|
||||
|
||||
@@ -37,7 +37,7 @@ type DataResetToken struct {
|
||||
}
|
||||
|
||||
type RequestUserResetHtml struct {
|
||||
ResetToken string `json:"reset_token"`
|
||||
ResetToken string `form:"reset_token"`
|
||||
}
|
||||
|
||||
type RequestUserResetPassword struct {
|
||||
|
||||
Reference in New Issue
Block a user