V3Create creates note
(w http.ResponseWriter, r *http.Request)
| 265 | |
| 266 | // V3Create creates note |
| 267 | func (n *Notes) V3Create(w http.ResponseWriter, r *http.Request) { |
| 268 | note, err := n.create(r) |
| 269 | if err != nil { |
| 270 | handleJSONError(w, err, "creating note") |
| 271 | return |
| 272 | } |
| 273 | |
| 274 | respondJSON(w, http.StatusCreated, CreateNoteResp{ |
| 275 | Result: presenters.PresentNote(note), |
| 276 | }) |
| 277 | } |
| 278 | |
| 279 | type DeleteNoteResp struct { |
| 280 | Status int `json:"status"` |
nothing calls this directly
no test coverage detected