From 629e275e5270ed146f9cd6dba25383cf80022909 Mon Sep 17 00:00:00 2001 From: SayaAndy Date: Sat, 25 Oct 2025 21:48:36 +0700 Subject: fix: make statements sequential in mailer new post method feat: switch mail service --- internal/router/lang-user-unsubscribe.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'internal/router') 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 -- cgit v1.3.1+13