feat: improvements in entity domain logic

This commit is contained in:
Elton Minetto
2020-10-07 22:57:54 -03:00
parent 098477169a
commit 83c00526b2
10 changed files with 35 additions and 30 deletions
-4
View File
@@ -27,10 +27,6 @@ func (s *Service) CreateBook(title string, author string, pages int, quantity in
if err != nil {
return b.ID, err
}
err = b.Validate()
if err != nil {
return b.ID, err
}
return s.repo.Create(b)
}