remove recover from recovery url
This commit is contained in:
parent
52b9682f60
commit
d54037b4da
@ -84,7 +84,7 @@ func (r *RecoveryController) HandleRecoveryRequest(c *fiber.Ctx) error {
|
||||
|
||||
signWithID := sign + id // подпись с id записи
|
||||
|
||||
err = r.service.RecoveryEmailTask(c.Context(), models.RecEmailDeps{UserID: user.ID.Hex(), Email: req.Email, SignWithID: strings.Replace(signUrl, "/changepwd","",1)+"/codeword/recover/"+signWithID, ID: id})
|
||||
err = r.service.RecoveryEmailTask(c.Context(), models.RecEmailDeps{UserID: user.ID.Hex(), Email: req.Email, SignWithID: strings.Replace(signUrl, "/changepwd","",1) + "/"+signWithID, ID: id})
|
||||
if err != nil {
|
||||
r.logger.Error("Failed to send recovery email", zap.Error(err))
|
||||
|
||||
@ -112,7 +112,7 @@ func (r *RecoveryController) HandleRecoveryLink(c *fiber.Ctx) error {
|
||||
record, err := r.service.GetRecoveryRecord(c.Context(), sign)
|
||||
if err != nil {
|
||||
r.logger.Error("Recovery link expired", zap.String("signature", sign))
|
||||
return c.Redirect("https://shub.pena.digital/recover/expired")
|
||||
return c.Redirect("https://hub.pena.digital/recover/expired")
|
||||
}
|
||||
|
||||
if time.Since(record.CreatedAt) > 15*time.Minute {
|
||||
|
Loading…
Reference in New Issue
Block a user