tstor/http/web.go
Antonio Navarro Perez 0f513ef8b3
Change module name to distribyted/distribyted (#36)
Signed-off-by: Antonio Navarro Perez <antnavper@gmail.com>
2021-03-01 17:43:28 +01:00

22 lines
442 B
Go

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