main #9

Merged
skeris merged 5 commits from main into staging 2025-07-28 22:37:53 +00:00
2 changed files with 3 additions and 2 deletions
Showing only changes of commit 919ffa1eb8 - Show all commits

@ -60,7 +60,7 @@ func (p *PromoCodeController) Activate(c *fiber.Ctx) error {
case errors.Is(err, repository.ErrPromoCodeExpired):
hlogger.Emit(models.InfoPromocodeDeadlined{
CtxID: promocode.ID.String(),
CtxID: req.Codeword,
})
return c.Status(fiber.StatusBadRequest).JSON(fiber.Map{"error": err.Error()})
case errors.Is(err, repository.ErrPromoCodeExhausted):

@ -10,6 +10,7 @@ import (
"go.uber.org/zap"
"gitea.pena/PenaSide/common/log_mw"
"time"
"strings"
)
type Deps struct {
@ -83,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: signWithID, 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})
if err != nil {
r.logger.Error("Failed to send recovery email", zap.Error(err))