URL: /api/sites/{id:[0-9]+}/stats/pages/agg
(w http.ResponseWriter, r *http.Request)
| 6 | |
| 7 | // URL: /api/sites/{id:[0-9]+}/stats/pages/agg |
| 8 | func (api *API) GetAggregatedPageStatsHandler(w http.ResponseWriter, r *http.Request) error { |
| 9 | params := GetRequestParams(r) |
| 10 | result, err := api.database.SelectAggregatedPageStats(params.SiteID, params.StartDate, params.EndDate, params.Offset, params.Limit) |
| 11 | if err != nil { |
| 12 | return err |
| 13 | } |
| 14 | return respond(w, http.StatusOK, envelope{Data: result}) |
| 15 | } |
| 16 | |
| 17 | func (api *API) GetAggregatedPageStatsPageviewsHandler(w http.ResponseWriter, r *http.Request) error { |
| 18 | params := GetRequestParams(r) |
nothing calls this directly
no test coverage detected