sub2clash/api/route.go

22 lines
329 B
Go
Raw Normal View History

2023-09-12 18:40:24 +08:00
package api
import (
"github.com/gin-gonic/gin"
2023-09-13 00:46:17 +08:00
"sub2clash/api/controller"
2023-09-13 13:47:22 +08:00
"sub2clash/middleware"
2023-09-12 18:40:24 +08:00
)
func SetRoute(r *gin.Engine) {
2023-09-13 13:47:22 +08:00
r.Use(middleware.ZapLogger())
2023-09-12 18:40:24 +08:00
r.GET(
"/clash", func(c *gin.Context) {
controller.SubmodHandler(c)
},
)
r.GET(
"/meta", func(c *gin.Context) {
controller.SubHandler(c)
},
)
}