middlewares/auth/auth.go
@@ -35,7 +35,7 @@ outUserM[userId] = userId } func removeOutUser(userId string) { func RemoveOutUser(userId string) { lock.Lock() defer lock.Unlock() if _,ok := outUserM[userId];ok{ @@ -53,10 +53,6 @@ util.ResponseFormat(c,code.TokenNotFound,"尚未登录,请登录") c.Abort() } user := (*jwtDriver).User(c) loginM := user.(map[string]interface{}) userId := loginM["id"].(string) removeOutUser(userId) c.Next() } else { c.Next()