Skip to content

Commit

Permalink
chore: Fix some linter complaints
Browse files Browse the repository at this point in the history
  • Loading branch information
rhafer committed Apr 25, 2024
1 parent a7c373c commit 98f3530
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions services/proxy/pkg/user/backend/cs3.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,12 @@ func (c *cs3backend) GetUserByClaims(ctx context.Context, claim, value string) (
if res.Status.Code == rpcv1beta1.Code_CODE_NOT_FOUND {
return nil, "", ErrAccountNotFound
}
return nil, "", fmt.Errorf("could not get user by claim %v with value %v : %s ", claim, value, res.Status.Message)
return nil, "", fmt.Errorf("could not get user by claim %v with value %v : %s ", claim, value, res.GetStatus().GetMessage())
}

user := res.User

return user, res.Token, nil
return user, res.GetToken(), nil
}

func (c *cs3backend) Authenticate(ctx context.Context, username string, password string) (*cs3.User, string, error) {
Expand All @@ -141,7 +141,7 @@ func (c *cs3backend) Authenticate(ctx context.Context, username string, password
case err != nil:
return nil, "", fmt.Errorf("could not authenticate with username and password user: %s, %w", username, err)
case res.Status.Code != rpcv1beta1.Code_CODE_OK:
return nil, "", fmt.Errorf("could not authenticate with username and password user: %s, got code: %d", username, res.Status.Code)
return nil, "", fmt.Errorf("could not authenticate with username and password user: %s, got code: %d", username, res.GetStatus().GetCode())
}

return res.User, res.Token, nil
Expand Down

0 comments on commit 98f3530

Please sign in to comment.