changes...
This commit is contained in:
parent
41944884b4
commit
ab4b53fd40
26 changed files with 600 additions and 51 deletions
|
|
@ -15,7 +15,7 @@ type UserService struct {
|
|||
repo repository.UsersRepository
|
||||
}
|
||||
|
||||
func NewUserService(repo repository.UsersRepository) UserService {
|
||||
func CreateUserService(repo repository.UsersRepository) UserService {
|
||||
return UserService{
|
||||
repo: repo,
|
||||
}
|
||||
|
|
@ -26,7 +26,7 @@ func (s *UserService) Create(cmd commands.CreateUserCommand) (*common.UserResult
|
|||
{
|
||||
user, err := s.repo.FindByName(cmd.Username)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
return nil, fmt.Errorf("User.create findByName error: %s", err)
|
||||
}
|
||||
|
||||
if user != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue