修复无法退出登录的问题

This commit is contained in:
dushixiang
2021-02-23 22:57:40 +08:00
parent 87586da40a
commit 8f3aee72e9
2 changed files with 3 additions and 2 deletions

View File

@ -168,7 +168,7 @@ func Run() error {
global.Cache = cache.New(5*time.Minute, 10*time.Minute)
global.Cache.OnEvicted(func(key string, value interface{}) {
if strings.HasPrefix(key, api.Token) {
token := strings.Split(key, ":")[0]
token := strings.Split(key, ":")[1]
logrus.Debugf("用户Token「%v」过期", token)
model.Logout(token)
}