fix: update error message to make it more clear (#13)

This commit is contained in:
JustSong 2023-04-25 15:13:25 +08:00
parent f6194fa86c
commit 01c1b906b5

View File

@ -65,7 +65,7 @@ func ValidateUserToken(key string) (token *Token, err error) {
}() }()
return token, nil return token, nil
} }
return nil, err return nil, errors.New("无效的 token")
} }
func GetTokenByIds(id int, userId int) (*Token, error) { func GetTokenByIds(id int, userId int) (*Token, error) {