mirror of
https://github.com/status-im/fathom.git
synced 2025-03-01 11:30:28 +00:00
15 lines
353 B
Go
15 lines
353 B
Go
package api
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/usefathom/fathom/pkg/count"
|
|
)
|
|
|
|
// URL: /api/screen-resolutions
|
|
var GetScreenResolutionsHandler = http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
before, after := getRequestedPeriods(r)
|
|
results := count.Screens(before, after, getRequestedLimit(r))
|
|
respond(w, envelope{Data: results})
|
|
})
|