refactoring all tests but handlers and process

This commit is contained in:
Julien Neuhart
2018-04-11 13:30:02 +02:00
parent 6b5a214462
commit a1abbc55a2
6 changed files with 84 additions and 70 deletions

View File

@@ -60,6 +60,7 @@ func convertHandler(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
c, err := converter.NewConverter(r)
if err != nil {
// TODO bad request if no file to convert
http.Error(w, err.Error(), http.StatusInternalServerError)
logger.Error(err)