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

Method GetAggregatedPageStatsPageviewsHandler

pkg/api/page_stats.go:17–24  ·  view source on GitHub ↗
(w http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

15}
16
17func (api *API) GetAggregatedPageStatsPageviewsHandler(w http.ResponseWriter, r *http.Request) error {
18 params := GetRequestParams(r)
19 result, err := api.database.GetAggregatedPageStatsPageviews(params.SiteID, params.StartDate, params.EndDate)
20 if err != nil {
21 return err
22 }
23 return respond(w, http.StatusOK, envelope{Data: result})
24}

Callers

nothing calls this directly

Calls 3

GetRequestParamsFunction · 0.85
respondFunction · 0.85

Tested by

no test coverage detected