summaryrefslogtreecommitdiffci
path: root/internal/router
diff options
from:
to:
context:
space:
mode:
authorGravatar SayaAndy <saya.andy@posteo.com> 2025-10-25 21:48:36 +0700
committerGravatar SayaAndy <saya.andy@posteo.com> 2025-10-25 21:48:36 +0700
commit629e275e5270ed146f9cd6dba25383cf80022909 (patch)
treed2b6ed2bd645eef448f987e57b97ff918909ea48 /internal/router
parente1dbbcf13f1a4c1f82a8f3eaeb54f67f7be2e480 (diff)
downloadweb-629e275e5270ed146f9cd6dba25383cf80022909.tar.gz
web-629e275e5270ed146f9cd6dba25383cf80022909.zip
fix: make statements sequential in mailer new post method
feat: switch mail service
Diffstat (limited to 'internal/router')
-rw-r--r--internal/router/lang-user-unsubscribe.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/internal/router/lang-user-unsubscribe.go b/internal/router/lang-user-unsubscribe.go
index 81d1bfb..c39f5e7 100644
--- a/internal/router/lang-user-unsubscribe.go
+++ b/internal/router/lang-user-unsubscribe.go
@@ -35,11 +35,13 @@ func Lang_User_Unsubscribe(l map[string]*locale.LocaleConfig, langs []config.Ava
statusText = l[lang].UnsubscribePage.UnsetCode
status = fiber.ErrBadRequest.Code
} else if clientError, serverError := Mailer.Unsubscribe(unsubscribeCode); clientError != nil {
+ slog.Info("got a client error when unsubscribing", slog.String("error", clientError.Error()))
statusColor = "255, 0, 0"
statusEmoji = "(͠≖~≖ ͡ )"
statusText = l[lang].UnsubscribePage.InvalidCode
status = fiber.ErrBadRequest.Code
} else if serverError != nil {
+ slog.Error("got a server error when unsubscribing", slog.String("error", serverError.Error()))
statusColor = "255, 128, 0"
statusEmoji = "( ˶°ㅁ°) !!"
statusText = l[lang].UnsubscribePage.OnServerError