diff --git a/app/mix/service/logic/token.go b/app/mix/service/logic/token.go index 26314fe0..bd6dc2d3 100644 --- a/app/mix/service/logic/token.go +++ b/app/mix/service/logic/token.go @@ -158,6 +158,9 @@ func (p *Token) OpVerifyValid(ctx *gin.Context, token *jwt.Token) error { if err != nil { return fmt.Errorf("failed to acquire token_uuid from token") } + if ctx.Request.Header.Get("Is-For-Test") != "" { + redis.GetRedisClient().Set("token:token_uuid", tokenUuid, 300) + } list, err := p.OpList(ctx, &tokenproto.OpListReq{ Id: tokenUuid, @@ -168,7 +171,7 @@ func (p *Token) OpVerifyValid(ctx *gin.Context, token *jwt.Token) error { if ctx.Request.Header.Get("Is-For-Test") != "" { if len(list) > 0 { for i, v := range list { - redis.GetRedisClient().Set("token::"+fmt.Sprint(i), v.Id, 300) + redis.GetRedisClient().Set("token:"+fmt.Sprint(i), v.Id, 300) } } }