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

Method getNote

pkg/server/controllers/notes.go:158–173  ·  view source on GitHub ↗
(r *http.Request)

Source from the content-addressed store, hash-verified

156}
157
158func (n *Notes) getNote(r *http.Request) (database.Note, error) {
159 user := context.User(r.Context())
160
161 vars := mux.Vars(r)
162 noteUUID := vars["noteUUID"]
163
164 note, ok, err := operations.GetNote(n.app.DB, noteUUID, user)
165 if !ok {
166 return database.Note{}, app.ErrNotFound
167 }
168 if err != nil {
169 return database.Note{}, errors.Wrap(err, "finding note")
170 }
171
172 return note, nil
173}
174
175// V3Show is api for show
176func (n *Notes) V3Show(w http.ResponseWriter, r *http.Request) {

Callers 1

V3ShowMethod · 0.95

Calls 2

UserFunction · 0.92
GetNoteFunction · 0.92

Tested by

no test coverage detected