Delete updates a book
(w http.ResponseWriter, r *http.Request)
| 288 | |
| 289 | // Delete updates a book |
| 290 | func (b *Books) V3Delete(w http.ResponseWriter, r *http.Request) { |
| 291 | book, err := b.del(r) |
| 292 | if err != nil { |
| 293 | handleJSONError(w, err, "creating a books") |
| 294 | return |
| 295 | } |
| 296 | |
| 297 | resp := deleteBookResp{ |
| 298 | Status: http.StatusOK, |
| 299 | Book: presenters.PresentBook(book), |
| 300 | } |
| 301 | respondJSON(w, http.StatusOK, resp) |
| 302 | } |
| 303 | |
| 304 | // IndexOptions is a handler for OPTIONS endpoint for notes |
| 305 | func (b *Books) IndexOptions(w http.ResponseWriter, r *http.Request) { |
nothing calls this directly
no test coverage detected