MCPcopy
hub / github.com/usefathom/fathom / GetSitesHandler

Method GetSitesHandler

pkg/api/sites.go:20–26  ·  view source on GitHub ↗

GET /api/sites

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

Source from the content-addressed store, hash-verified

18
19// GET /api/sites
20func (api *API) GetSitesHandler(w http.ResponseWriter, r *http.Request) error {
21 result, err := api.database.GetSites()
22 if err != nil {
23 return err
24 }
25 return respond(w, http.StatusOK, envelope{Data: result})
26}
27
28// POST /api/sites
29// POST /api/sites/{id}

Callers

nothing calls this directly

Calls 2

respondFunction · 0.85
GetSitesMethod · 0.65

Tested by

no test coverage detected