Skip to content

Commit

Permalink
chore: simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
andig committed Apr 11, 2024
1 parent d316dc9 commit 2d613d6
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions vehicle/smart/hello/identity.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func NewIdentity(log *util.Logger, user, password string) (*Identity, error) {
return v, err
}

func (v *Identity) RefreshToken(token *oauth2.Token) (*oauth2.Token, error) {
func (v *Identity) RefreshToken(_ *oauth2.Token) (*oauth2.Token, error) {
token, err := v.login()
if err != nil {
return nil, err
Expand All @@ -48,11 +48,9 @@ func (v *Identity) RefreshToken(token *oauth2.Token) (*oauth2.Token, error) {
return nil, err
}

if err == nil {
v.userID = userID
}
v.userID = userID

return appToken, err
return appToken, nil
}

func (v *Identity) DeviceID() string {
Expand Down

0 comments on commit 2d613d6

Please sign in to comment.