Skip to content

Commit

Permalink
Code refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
mortezaalizadeh committed Feb 16, 2021
1 parent d23a88d commit 11f790d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions services/repository/mongodb/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import (
)

type user struct {
models.User
Email string `bson:"email" json:"email"`
}

Expand Down Expand Up @@ -69,7 +68,7 @@ func (service *mongodbRepositoryService) CreateUser(

defer disconnect(ctx, client)

insertResult, err := collection.InsertOne(ctx, user{request.User, request.Email})
insertResult, err := collection.InsertOne(ctx, user{request.Email})
if err != nil {
return nil, repository.NewUnknownErrorWithError("User creation failed.", err)
}
Expand Down

0 comments on commit 11f790d

Please sign in to comment.