修改奖励类型,游戏列表接口,
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
package jwt
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"server/utility/ecode"
|
||||
"strings"
|
||||
"time"
|
||||
@ -99,6 +100,9 @@ func ParseToken(tokenString string) (*TokenOut, error) {
|
||||
return secretKey, nil
|
||||
})
|
||||
if err != nil {
|
||||
if errors.Is(err, jwt.ErrTokenExpired) {
|
||||
return nil, ecode.Expire.Sub("token 已过期")
|
||||
}
|
||||
return nil, ecode.Fail.Sub("解析 token 出现异常")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user