From 88cb349ff4663302d680abe58252f5b09755d5c6 Mon Sep 17 00:00:00 2001 From: Eccentric Date: Sat, 10 Feb 2024 02:10:41 +0000 Subject: [PATCH] Remove uneeded couts --- discord/admin.go | 4 +--- handlers/client.go | 8 -------- handlers/friends.go | 2 -- handlers/storage.go | 2 -- person/person.go | 3 --- 5 files changed, 1 insertion(+), 18 deletions(-) diff --git a/discord/admin.go b/discord/admin.go index a657be5..10e0cda 100644 --- a/discord/admin.go +++ b/discord/admin.go @@ -166,8 +166,6 @@ func addBanHandler(s *discordgo.Session, i *discordgo.InteractionCreate, looker } } - aid.Print(expiry) - player.AddBan(reason, looker.ID, expiry) s.InteractionRespond(i.Interaction, &discordgo.InteractionResponse{ Type: discordgo.InteractionResponseChannelMessageWithSource, @@ -192,7 +190,7 @@ func listBansHandler(s *discordgo.Session, i *discordgo.InteractionCreate, looke SetTitle("Ban History"). SetColor(0x2b2d31) - player.BanHistory.Range(func(key string, ban *storage.DB_BanStatus) bool { + player.BanHistory.Range(func(key string, ban *storage.DB_BanStatus) bool { banIssuer := person.Find(ban.IssuedBy) if banIssuer == nil { banIssuer = &person.Person{Discord: &storage.DB_DiscordPerson{ID: "0"}} diff --git a/handlers/client.go b/handlers/client.go index cdb046e..164416c 100644 --- a/handlers/client.go +++ b/handlers/client.go @@ -675,14 +675,6 @@ func clientRefundMtxPurchaseAction(c *fiber.Ctx, person *p.Person, profile *p.Pr return fmt.Errorf("invalid Body") } - aid.Print(person.AthenaProfile.Purchases.Count()) - aid.Print(person.CommonCoreProfile.Purchases.Count()) - - person.AthenaProfile.Purchases.RangePurchases(func(key string, value *p.Purchase) bool { - aid.Print(key, value.ID) - return true - }) - purchase := person.AthenaProfile.Purchases.GetPurchase(body.PurchaseID) if purchase == nil { return fmt.Errorf("purchase not found") diff --git a/handlers/friends.go b/handlers/friends.go index 06c41c6..a421e9a 100644 --- a/handlers/friends.go +++ b/handlers/friends.go @@ -1,7 +1,6 @@ package handlers import ( - "fmt" "time" "github.com/ectrc/snow/aid" @@ -30,7 +29,6 @@ func GetFriendList(c *fiber.Ctx) error { func PostCreateFriend(c *fiber.Ctx) error { relationship, err := c.Locals("person").(*p.Person).CreateRelationship(c.Params("wanted")) if err != nil { - aid.Print(fmt.Sprintf("Error creating relationship: %s", err.Error())) return c.Status(400).JSON(aid.ErrorBadRequest(err.Error())) } diff --git a/handlers/storage.go b/handlers/storage.go index 8a3cef3..d98a689 100644 --- a/handlers/storage.go +++ b/handlers/storage.go @@ -109,7 +109,6 @@ func GetUserStorageFile(c *fiber.Ctx) error { file, err := storage.Repo.Amazon.GetUserFile(person.ID) if err != nil { - aid.Print("(amazon)", err.Error()) return c.Status(500).JSON(aid.ErrorBadRequest("Failed to retrieve user file")) } @@ -126,7 +125,6 @@ func PutUserStorageFile(c *fiber.Ctx) error { err := storage.Repo.Amazon.CreateUserFile(person.ID, body) if err != nil { - aid.Print("(amazon)", err.Error()) return c.Status(500).JSON(aid.ErrorBadRequest("Failed to create user file")) } diff --git a/person/person.go b/person/person.go index 075a51b..88c67eb 100644 --- a/person/person.go +++ b/person/person.go @@ -273,9 +273,6 @@ func (p *Person) AddBan(reason string, issuedBy string, expiry ...string) { parsed, err := aid.ParseDuration(expiry[0]) if err == nil { t = time.Now().Add(parsed) - aid.Print("Parsed duration for ban expiry:", t.Format("2006-01-02T15:04:05.999Z")) - } else { - aid.Print("Failed to parse duration for ban expiry:", err) } }