mirror of https://github.com/status-im/fathom.git
use limit from request when getting pageviews
This commit is contained in:
parent
11775e063b
commit
760780f07b
|
@ -10,7 +10,8 @@ import (
|
|||
// URL: /api/pageviews
|
||||
var GetPageviewsHandler = HandlerFunc(func(w http.ResponseWriter, r *http.Request) error {
|
||||
before, after := getRequestedPeriods(r)
|
||||
results, err := count.Pageviews(before, after, defaultLimit)
|
||||
limit := getRequestedLimit(r)
|
||||
results, err := count.Pageviews(before, after, limit)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue