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

Method GetSiteStatsHandler

pkg/api/site_stats.go:28–35  ·  view source on GitHub ↗

URL: /api/sites/{id:[0-9]+}/stats/site

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

Source from the content-addressed store, hash-verified

26
27// URL: /api/sites/{id:[0-9]+}/stats/site
28func (api *API) GetSiteStatsHandler(w http.ResponseWriter, r *http.Request) error {
29 params := GetRequestParams(r)
30 result, err := api.database.SelectSiteStats(params.SiteID, params.StartDate, params.EndDate)
31 if err != nil {
32 return err
33 }
34 return respond(w, http.StatusOK, envelope{Data: result})
35}

Callers

nothing calls this directly

Calls 3

GetRequestParamsFunction · 0.85
respondFunction · 0.85
SelectSiteStatsMethod · 0.65

Tested by

no test coverage detected