Remove uneeded couts
This commit is contained in:
parent
0a63dd8fe4
commit
88cb349ff4
|
@ -166,8 +166,6 @@ func addBanHandler(s *discordgo.Session, i *discordgo.InteractionCreate, looker
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
aid.Print(expiry)
|
|
||||||
|
|
||||||
player.AddBan(reason, looker.ID, expiry)
|
player.AddBan(reason, looker.ID, expiry)
|
||||||
s.InteractionRespond(i.Interaction, &discordgo.InteractionResponse{
|
s.InteractionRespond(i.Interaction, &discordgo.InteractionResponse{
|
||||||
Type: discordgo.InteractionResponseChannelMessageWithSource,
|
Type: discordgo.InteractionResponseChannelMessageWithSource,
|
||||||
|
@ -192,7 +190,7 @@ func listBansHandler(s *discordgo.Session, i *discordgo.InteractionCreate, looke
|
||||||
SetTitle("Ban History").
|
SetTitle("Ban History").
|
||||||
SetColor(0x2b2d31)
|
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)
|
banIssuer := person.Find(ban.IssuedBy)
|
||||||
if banIssuer == nil {
|
if banIssuer == nil {
|
||||||
banIssuer = &person.Person{Discord: &storage.DB_DiscordPerson{ID: "0"}}
|
banIssuer = &person.Person{Discord: &storage.DB_DiscordPerson{ID: "0"}}
|
||||||
|
|
|
@ -675,14 +675,6 @@ func clientRefundMtxPurchaseAction(c *fiber.Ctx, person *p.Person, profile *p.Pr
|
||||||
return fmt.Errorf("invalid Body")
|
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)
|
purchase := person.AthenaProfile.Purchases.GetPurchase(body.PurchaseID)
|
||||||
if purchase == nil {
|
if purchase == nil {
|
||||||
return fmt.Errorf("purchase not found")
|
return fmt.Errorf("purchase not found")
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package handlers
|
package handlers
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/ectrc/snow/aid"
|
"github.com/ectrc/snow/aid"
|
||||||
|
@ -30,7 +29,6 @@ func GetFriendList(c *fiber.Ctx) error {
|
||||||
func PostCreateFriend(c *fiber.Ctx) error {
|
func PostCreateFriend(c *fiber.Ctx) error {
|
||||||
relationship, err := c.Locals("person").(*p.Person).CreateRelationship(c.Params("wanted"))
|
relationship, err := c.Locals("person").(*p.Person).CreateRelationship(c.Params("wanted"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
aid.Print(fmt.Sprintf("Error creating relationship: %s", err.Error()))
|
|
||||||
return c.Status(400).JSON(aid.ErrorBadRequest(err.Error()))
|
return c.Status(400).JSON(aid.ErrorBadRequest(err.Error()))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -109,7 +109,6 @@ func GetUserStorageFile(c *fiber.Ctx) error {
|
||||||
|
|
||||||
file, err := storage.Repo.Amazon.GetUserFile(person.ID)
|
file, err := storage.Repo.Amazon.GetUserFile(person.ID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
aid.Print("(amazon)", err.Error())
|
|
||||||
return c.Status(500).JSON(aid.ErrorBadRequest("Failed to retrieve user file"))
|
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)
|
err := storage.Repo.Amazon.CreateUserFile(person.ID, body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
aid.Print("(amazon)", err.Error())
|
|
||||||
return c.Status(500).JSON(aid.ErrorBadRequest("Failed to create user file"))
|
return c.Status(500).JSON(aid.ErrorBadRequest("Failed to create user file"))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -273,9 +273,6 @@ func (p *Person) AddBan(reason string, issuedBy string, expiry ...string) {
|
||||||
parsed, err := aid.ParseDuration(expiry[0])
|
parsed, err := aid.ParseDuration(expiry[0])
|
||||||
if err == nil {
|
if err == nil {
|
||||||
t = time.Now().Add(parsed)
|
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)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user