Skip to content

Commit

Permalink
Merge pull request #26 from fy23-gw-gackathon/fix/#25_return_value_Ge…
Browse files Browse the repository at this point in the history
…tUserIDFromToken

ref #25 fix return value
  • Loading branch information
gari8 committed May 10, 2023
2 parents 084c078 + fae6edc commit ce0c631
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions infrastructure/persistence/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ func (p UserPersistence) GetOrganizationUser(ctx context.Context, organizationCo
}

func (p UserPersistence) GetUserIDFromToken(ctx context.Context, token string) (*string, error) {
user, err := p.CognitoClient.GetUserFromToken(ctx, token)
cognitoUser, err := p.CognitoClient.GetUserFromToken(ctx, token)
if err != nil {
return nil, entity.NewError(http.StatusUnauthorized, err)
}
return &user.ID, nil
return &cognitoUser.UserID, nil
}

func (p UserPersistence) CreateUser(ctx context.Context, email, organizationID string) (*entity.User, error) {
Expand Down

0 comments on commit ce0c631

Please sign in to comment.