copy change

This commit is contained in:
Neeraj Gupta
2025-04-25 11:57:23 +05:30
parent 6ae9003585
commit c32e4be8be

View File

@@ -301,7 +301,6 @@ func (c *UserController) NotifyAccountDeletion(userID int64, userEmail string, i
templateData := make(map[string]interface{})
templateData["AccountRecoveryLink"] = fmt.Sprintf("%s/users/recover-account?token=%s", "https://api.ente.io", recoverToken)
logrus.Info("account recovery link: ", templateData["AccountRecoveryLink"])
err := email.SendTemplatedEmail([]string{userEmail}, "ente", "team@ente.io",
AccountDeletedEmailSubject, template, templateData, nil)
if err != nil {
@@ -336,11 +335,11 @@ func (c *UserController) HandleAccountRecovery(ctx *gin.Context, req ente.Recove
"email": req.EmailID,
"userID": req.UserID,
})
logger.Info("recover account request")
logger.Info("initiating account recovery")
_, err := c.UserRepo.Get(req.UserID)
if err == nil {
return stacktrace.Propagate(ente.NewBadRequestError(&ente.ApiErrorParams{
Message: "Either account already recovered or User ID is linked to an active account account",
Message: "account is already recovered or userID is linked to another active account",
}), "")
}
if !errors.Is(err, ente.ErrUserDeleted) {