We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 51d0290 + 7dfc7e5 commit fadf49eCopy full SHA for fadf49e
pkg/api/api.go
@@ -1973,21 +1973,10 @@ func (s *ScalewayAPI) CheckCredentials() error {
1973
if err != nil {
1974
return err
1975
}
1976
- found := false
1977
var tokens ScalewayGetTokens
1978
-
1979
if err = json.Unmarshal(body, &tokens); err != nil {
1980
1981
1982
- for _, token := range tokens.Tokens {
1983
- if token.ID == s.Token {
1984
- found = true
1985
- break
1986
- }
1987
1988
- if !found {
1989
- return fmt.Errorf("Invalid token %v", s.Token)
1990
1991
return nil
1992
1993
0 commit comments