feat(db): disable redis and use local map to store values

This commit is contained in:
Anhgelus Morhtuuzh 2025-05-21 18:46:27 +02:00
parent 642025681b
commit ceffa15763
Signed by: anhgelus
GPG key ID: CAD341EFA92DDDE5
7 changed files with 27 additions and 110 deletions

View file

@ -1,7 +1,6 @@
package user
import (
"fmt"
"github.com/anhgelus/gokord"
"github.com/anhgelus/gokord/utils"
"time"
@ -60,10 +59,6 @@ func (c *Copaing) Save() error {
return gokord.DB.Save(c).Error
}
func (c *Copaing) GenKey(key string) string {
return fmt.Sprintf("%s:%s:%s", c.GuildID, c.DiscordID, key)
}
func (c *Copaing) Delete() error {
return gokord.DB.Where("guild_id = ? AND discord_id = ?", c.GuildID, c.DiscordID).Delete(c).Error
}