oxisto/okr2go

Create utility function for the NotFound/BadRequest construct

todo opened this issue · 0 comments

todo commented

Return StatusNotFound if object is nil and StatusBadRequest if error


okr2go/rest.go

Lines 36 to 41 in bee4292

// @todo Create utility function for the NotFound/BadRequest construct
// @body Return StatusNotFound if object is nil and StatusBadRequest if error
objective, err = getObjectiveFromRequest(w, r)
if err != nil {
httputil.JSONResponseWithStatus(w, r, nil, err, http.StatusBadRequest)
return


This issue was generated by todo based on a @todo comment in bee4292. It's been assigned to @oxisto because they committed the code.