fixed redundant error handling

This commit is contained in:
Derek McQuay 2017-02-04 23:39:50 -08:00
parent 8d178d0541
commit 065b0d2cc6
No known key found for this signature in database
GPG Key ID: 92A7BC0C86B0B91A
1 changed files with 0 additions and 12 deletions

12
api.go
View File

@ -69,12 +69,6 @@ func (s *Server) category(w http.ResponseWriter, req *http.Request) {
http.Error(w, string(b), http.StatusInternalServerError)
return
}
if err != nil {
log.Printf("%+v", err)
b, _ := json.Marshal(NewFailure(err.Error()))
http.Error(w, string(b), http.StatusBadRequest)
return
}
}
}
@ -179,11 +173,5 @@ func (s *Server) user(w http.ResponseWriter, req *http.Request) {
http.Error(w, string(b), http.StatusInternalServerError)
return
}
if err != nil {
log.Printf("%+v", err)
b, _ := json.Marshal(NewFailure(err.Error()))
http.Error(w, string(b), http.StatusBadRequest)
return
}
}
}