Skip to content

Commit

Permalink
typo
Browse files Browse the repository at this point in the history
  • Loading branch information
fmartingr committed Dec 25, 2024
1 parent a52b374 commit 2410aff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion e2e/playwright/auth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ func TestAuth(t *testing.T) {
require.NoError(t, buttonLocator.Click())
errorText, err := errorLocator.TextContent()
require.NoError(t, err)
require.Contains(t, errorText, "username or password invalid")
require.Contains(t, errorText, "username or password do not match")
})

t.Run("empty username validation", func(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions internal/domains/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,13 @@ func (d *AuthDomain) GetAccountFromCredentials(ctx context.Context, username, pa
}

if len(accounts) != 1 {
return nil, fmt.Errorf("username org password do not match")
return nil, fmt.Errorf("username or password do not match")
}

account := accounts[0]

if err := bcrypt.CompareHashAndPassword([]byte(account.Password), []byte(password)); err != nil {
return nil, fmt.Errorf("username org password do not match")
return nil, fmt.Errorf("username or password do not match")
}

return model.Ptr(account.ToDTO()), nil
Expand Down

0 comments on commit 2410aff

Please sign in to comment.