mirror of
https://github.com/status-im/fathom.git
synced 2025-03-01 03:20:27 +00:00
21 lines
414 B
Go
21 lines
414 B
Go
package api
|
|
|
|
import (
|
|
"net/http"
|
|
"log"
|
|
)
|
|
|
|
func RegisterRoutes() {
|
|
http.HandleFunc("/api/visits/count/day", GetVisitsDayCountHandler)
|
|
http.HandleFunc("/api/visits/count/realtime", GetVisitsRealtimeCount)
|
|
http.HandleFunc("/api/visits", GetVisitsHandler)
|
|
http.HandleFunc("/api/pageviews", GetPageviewsHandler)
|
|
}
|
|
|
|
// log fatal errors
|
|
func checkError(err error) {
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
}
|