tstor/http/web.go
Antonio Navarro Perez 5d4e48f0f9
Improve logs (#89)
2021-11-20 20:57:25 +01:00

22 lines
440 B
Go

package http
import (
"net/http"
"github.com/distribyted/distribyted/torrent"
"github.com/gin-gonic/gin"
)
var indexHandler = func(c *gin.Context) {
c.HTML(http.StatusOK, "index.html", nil)
}
var routesHandler = func(ss *torrent.Stats) gin.HandlerFunc {
return func(c *gin.Context) {
c.HTML(http.StatusOK, "routes.html", ss.RoutesStats())
}
}
var logsHandler = func(c *gin.Context) {
c.HTML(http.StatusOK, "logs.html", nil)
}