feat(db): disable redis and use local map to store values
This commit is contained in:
parent
642025681b
commit
ceffa15763
7 changed files with 27 additions and 110 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue