feat: new handlers - WIP

This commit is contained in:
Elton Minetto
2020-06-26 15:51:51 -03:00
parent adc2331b89
commit bf36e4cc88
5 changed files with 126 additions and 63 deletions
-1
View File
@@ -118,7 +118,6 @@ func getBook(service book.UseCase) http.Handler {
return
}
data, err := service.Get(id)
w.Header().Set("Content-Type", "application/json")
if err != nil && err != domain.ErrNotFound {
w.WriteHeader(http.StatusInternalServerError)
w.Write([]byte(errorMessage))