package route import ( "youngee_b_api/handler" "youngee_b_api/middleware" "github.com/gin-gonic/gin" ) func InitRoute(r *gin.Engine) { r.POST("/login", handler.WrapPasswordLoginHandler) m := r.Group("/youngee/m") { m.Use(middleware.LoginAuthMiddleware) m.POST("/test", func(c *gin.Context) { c.JSON(200, "ok") // 注意这里只是debug用的 接口要写成handler形式 }) } }