servePermanodesWithAttr uses the indexer to search for the permanodes matching the request. The valid values for the "attr" key in the request (i.e the only attributes for a permanode which are actually indexed as such) are "tag" and "title".
(rw http.ResponseWriter, req *http.Request)
| 627 | // The valid values for the "attr" key in the request (i.e the only attributes |
| 628 | // for a permanode which are actually indexed as such) are "tag" and "title". |
| 629 | func (h *Handler) servePermanodesWithAttr(rw http.ResponseWriter, req *http.Request) { |
| 630 | defer httputil.RecoverJSON(rw, req) |
| 631 | var wr WithAttrRequest |
| 632 | wr.fromHTTP(req) |
| 633 | res, err := h.GetPermanodesWithAttr(&wr) |
| 634 | if err != nil { |
| 635 | httputil.ServeJSONError(rw, err) |
| 636 | return |
| 637 | } |
| 638 | httputil.ReturnJSON(rw, res) |
| 639 | } |
| 640 | |
| 641 | // GetClaims returns the claims on req.Permanode signed by h.owner. |
| 642 | func (h *Handler) GetClaims(req *ClaimsRequest) (*ClaimsResponse, error) { |
nothing calls this directly
no test coverage detected