HTTP handler for a GET of a document's channels and their sequence spans
()
| 81 | |
| 82 | // HTTP handler for a GET of a document's channels and their sequence spans |
| 83 | func (h *handler) handleGetDocChannels() error { |
| 84 | docid := h.PathVar("docid") |
| 85 | |
| 86 | doc, err := h.collection.GetDocument(h.ctx(), docid, db.DocUnmarshalSync) |
| 87 | if err != nil { |
| 88 | return err |
| 89 | } |
| 90 | if doc == nil { |
| 91 | return kNotFoundError |
| 92 | } |
| 93 | resp := populateDocChannelInfo(*doc) |
| 94 | h.writeJSON(resp) |
| 95 | return nil |
| 96 | } |
| 97 | |
| 98 | // HTTP handler for running a document through the sync function and returning the results |
| 99 | // |
nothing calls this directly
no test coverage detected