refactor and update

This commit is contained in:
YouROK
2020-11-11 17:01:14 +03:00
parent b4a20760cc
commit 0d9f68c3c8
11 changed files with 258 additions and 13 deletions

View File

@@ -2,7 +2,6 @@ package api
import (
"github.com/gin-gonic/gin"
"server/torr"
"server/version"
)
@@ -10,13 +9,7 @@ type requestI struct {
Action string `json:"action,omitempty"`
}
type responseI struct {
}
var bts *torr.BTServer
func SetupRouteApi(route *gin.Engine, serv *torr.BTServer) {
bts = serv
func SetupRoute(route *gin.Engine) {
route.GET("/echo", echo)
route.POST("/settings", settings)