feat(accounts): improve account creation

This commit is contained in:
2021-11-12 00:38:44 +01:00
parent 78071a6a91
commit 7bf8db8050
5 changed files with 24 additions and 19 deletions

View File

@@ -3,7 +3,6 @@ package account
import (
"nos-comptes/internal/storage/dao"
"nos-comptes/internal/storage/model"
"nos-comptes/internal/utils"
)
type Service struct {
@@ -31,7 +30,6 @@ func (s *Service) GetAllAccountOfUser(userId string) ([]*Account, error) {
func (s *Service) GetAccountWithNameForUser(name string, id string) (*Account, error) {
account, err := s.db.GetAccountWithNameForUser(name, id)
utils.GetLogger().Warn(err)
if e, ok := err.(*dao.Error); ok {
switch {
case e.Type == dao.ErrTypeNotFound: