disable echo auth

This commit is contained in:
YouROK
2021-03-03 15:15:34 +03:00
parent 944741d8e3
commit 6a391cddf7
2 changed files with 7 additions and 6 deletions

View File

@@ -5,9 +5,9 @@ import (
"time"
"github.com/gin-gonic/gin"
sets "server/settings"
"server/torr"
"server/version"
)
type requestI struct {
@@ -15,7 +15,6 @@ type requestI struct {
}
func SetupRoute(route *gin.RouterGroup) {
route.GET("/echo", echo)
route.GET("/shutdown", shutdown)
route.POST("/settings", settings)
@@ -38,10 +37,6 @@ func SetupRoute(route *gin.RouterGroup) {
route.GET("/playlist/*fname", playList)
}
func echo(c *gin.Context) {
c.String(200, "%v", version.Version)
}
func shutdown(c *gin.Context) {
if sets.ReadOnly {
c.Status(http.StatusForbidden)