修复无法退出登录的问题

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

@ -165,7 +165,8 @@ func loginWithTotpEndpoint(c echo.Context) error {
func LogoutEndpoint(c echo.Context) error {
token := GetToken(c)
global.Cache.Delete(token)
cacheKey := strings.Join([]string{Token, token}, ":")
global.Cache.Delete(cacheKey)
model.Logout(token)
return Success(c, nil)
}