Skip to content

Commit

Permalink
fix: where create email address
Browse files Browse the repository at this point in the history
  • Loading branch information
katallaxie authored Aug 9, 2024
1 parent ac8f054 commit 57f63dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion adapters/gorm/gorm.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func New(db *gorm.DB) *gormAdapter {

// CreateUser is a helper function to create a new user.
func (a *gormAdapter) CreateUser(ctx context.Context, user adapters.GothUser) (adapters.GothUser, error) {
err := a.db.WithContext(ctx).FirstOrCreate(&user).Error
err := a.db.WithContext(ctx).Where(adapters.GothUser{Email: user.Email}).FirstOrCreate(&user).Error
if err != nil {
return adapters.GothUser{}, goth.ErrMissingUser
}
Expand Down

0 comments on commit 57f63dd

Please sign in to comment.