MCPcopy Index your code
hub / github.com/dnote/dnote / V3Delete

Method V3Delete

pkg/server/controllers/books.go:290–302  ·  view source on GitHub ↗

Delete updates a book

(w http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

288
289// Delete updates a book
290func (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
305func (b *Books) IndexOptions(w http.ResponseWriter, r *http.Request) {

Callers

nothing calls this directly

Calls 4

delMethod · 0.95
PresentBookFunction · 0.92
handleJSONErrorFunction · 0.85
respondJSONFunction · 0.85

Tested by

no test coverage detected