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

Method V3Create

pkg/server/controllers/notes.go:267–277  ·  view source on GitHub ↗

V3Create creates note

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

Source from the content-addressed store, hash-verified

265
266// V3Create creates note
267func (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
279type DeleteNoteResp struct {
280 Status int `json:"status"`

Callers

nothing calls this directly

Calls 4

createMethod · 0.95
PresentNoteFunction · 0.92
handleJSONErrorFunction · 0.85
respondJSONFunction · 0.85

Tested by

no test coverage detected