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

Method V3Update

pkg/server/controllers/notes.go:367–378  ·  view source on GitHub ↗

V3Update updates a note

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

Source from the content-addressed store, hash-verified

365
366// V3Update updates a note
367func (n *Notes) V3Update(w http.ResponseWriter, r *http.Request) {
368 note, err := n.update(r)
369 if err != nil {
370 handleJSONError(w, err, "updating note")
371 return
372 }
373
374 respondJSON(w, http.StatusOK, updateNoteResp{
375 Status: http.StatusOK,
376 Result: presenters.PresentNote(note),
377 })
378}
379
380// IndexOptions is a handler for OPTIONS endpoint for notes
381func (n *Notes) IndexOptions(w http.ResponseWriter, r *http.Request) {

Callers

nothing calls this directly

Calls 4

updateMethod · 0.95
PresentNoteFunction · 0.92
handleJSONErrorFunction · 0.85
respondJSONFunction · 0.85

Tested by

no test coverage detected