Specify response status codes (delete, create)

Fixes #28
This commit is contained in:
Matthew Ryan Dillon 2015-10-20 16:24:08 -07:00
parent 5dd14c1ffe
commit cc50c794ba

View file

@ -110,7 +110,10 @@ func handleCreater(c api.Creater) errorHandler {
if err != nil {
return newJSONError(err, http.StatusInternalServerError)
}
w.WriteHeader(http.StatusCreated)
w.Write(data)
return nil
}
}
@ -129,6 +132,8 @@ func handleDeleter(d api.Deleter) errorHandler {
return appErr
}
w.WriteHeader(http.StatusNoContent)
return nil
}
}