diff --git a/server/web/api/cache.go b/server/web/api/cache.go index e8da18b..a27d4d6 100644 --- a/server/web/api/cache.go +++ b/server/web/api/cache.go @@ -9,7 +9,7 @@ import ( "github.com/pkg/errors" ) -//Action: get +// Action: get type cacheReqJS struct { requestI Hash string `json:"hash,omitempty"` diff --git a/server/web/api/torrents.go b/server/web/api/torrents.go index d67a084..c7f843f 100644 --- a/server/web/api/torrents.go +++ b/server/web/api/torrents.go @@ -15,7 +15,7 @@ import ( "github.com/pkg/errors" ) -//Action: add, get, set, rem, list, drop +// Action: add, get, set, rem, list, drop type torrReqJS struct { requestI Link string `json:"link,omitempty"` diff --git a/server/web/msx/msx.go b/server/web/msx/msx.go index 52aa8f6..dfb8fe5 100644 --- a/server/web/msx/msx.go +++ b/server/web/msx/msx.go @@ -2,7 +2,7 @@ package msx import ( _ "embed" - + "server/version" "github.com/gin-gonic/gin" @@ -23,16 +23,11 @@ var ( rus []byte ) -func ass(b []byte, t string) func(*gin.Context) { - return func(c *gin.Context) { - c.Header("Content-Encoding", "gzip") - c.Data(200, t+"; charset=UTF-8", b) - } -} func ass(c *gin.Context, b []byte, t string) { c.Header("Content-Encoding", "gzip") c.Data(200, t+"; charset=UTF-8", b) } + func SetupRoute(r *gin.RouterGroup) { r.GET("/msx/:pth", func(c *gin.Context) { s := []string{"tvx", "tizen"}