mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 21:46:11 +05:00
22 lines
368 B
Go
22 lines
368 B
Go
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)
|
|
}
|