package pages import ( "github.com/anacrolix/torrent/metainfo" "github.com/gin-gonic/gin" "server/settings" "server/torr" "server/web/pages/template" ) func SetupRoute(route *gin.RouterGroup) { template.RouteWebPages(route) route.GET("/stat", statPage) route.GET("/magnets", getTorrents) } func statPage(c *gin.Context) { torr.WriteStatus(c.Writer) c.Status(200) } func getTorrents(c *gin.Context) { list := settings.ListTorrent() http := "