fix buffering cache

This commit is contained in:
YouROK
2020-12-08 22:03:48 +03:00
parent 442c1fc27a
commit 212a60a893
12 changed files with 83 additions and 31 deletions

View File

@@ -1,10 +0,0 @@
package pages
import (
"github.com/gin-gonic/gin"
"server/web/pages/template"
)
func mainPage(c *gin.Context) {
c.Data(200, "text/html; charset=utf-8", template.IndexHtml)
}

View File

@@ -2,8 +2,20 @@ package pages
import (
"github.com/gin-gonic/gin"
"server/torr"
"server/web/pages/template"
)
func SetupRoute(route *gin.Engine) {
route.GET("/", mainPage)
route.GET("/stat", statPage)
}
func mainPage(c *gin.Context) {
c.Data(200, "text/html; charset=utf-8", template.IndexHtml)
}
func statPage(c *gin.Context) {
torr.WriteStatus(c.Writer)
c.Status(200)
}

File diff suppressed because one or more lines are too long