Implement daily stats
This commit is contained in:
@@ -21,6 +21,7 @@ func NewWebServer(db *clover.DB, port int) *WebServer {
|
||||
"add": func(a, b int) int { return a + b },
|
||||
"sub": func(a, b int) int { return a - b },
|
||||
"humanDiff": helpers.HumanDiff,
|
||||
"formatHashrate": helpers.FormatHashrate,
|
||||
"formatCreateDate": helpers.FormatCreateDate,
|
||||
})
|
||||
|
||||
@@ -39,6 +40,7 @@ func (ws *WebServer) Start() error {
|
||||
http.HandleFunc("/", ws.IndexHandler)
|
||||
http.HandleFunc("/shares", ws.SharesHandler)
|
||||
http.HandleFunc("/top-shares", ws.TopSharesHandler)
|
||||
http.HandleFunc("/daily-stats", ws.DailyStatsHandler)
|
||||
|
||||
address := ":" + fmt.Sprint(ws.port)
|
||||
println("Listening on", address)
|
||||
|
||||
Reference in New Issue
Block a user