From 3c9b826ed23018c1f3a4a79119c2850e6b2d707e Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Sun, 29 Dec 2024 01:36:35 +0800 Subject: [PATCH] :loud_sound: Verbose logging on active boost --- pkg/internal/services/boost.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/internal/services/boost.go b/pkg/internal/services/boost.go index f94f997..cf04a37 100644 --- a/pkg/internal/services/boost.go +++ b/pkg/internal/services/boost.go @@ -74,7 +74,7 @@ func CreateBoost(user *sec.UserInfo, source models.Attachment, destination int) } } - if err := database.C.Create(&boost).Error; err != nil { + if err := database.C.Save(&boost).Error; err != nil { return boost, err } @@ -85,6 +85,8 @@ func CreateBoost(user *sec.UserInfo, source models.Attachment, destination int) } func ActivateBoost(boost models.AttachmentBoost) { + log.Debug().Any("boost", boost).Msg("Activating boost...") + dests := cast.ToSlice(viper.Get("destinations")) if boost.Destination >= len(dests) { log.Warn().Any("boost", boost).Msg("Unable to activate boost, invalid destination...")