package routers import ( "Panel_development/app/controller" middlewares "Panel_development/app/middleware" "github.com/gin-gonic/gin" ) func AdminRouter(r *gin.Engine) { group := r.Group("/api") group.Use(middlewares.AdminMiddleware()) //组件分类 group.POST("/addcomponentclass", controller.AddComponentClassify) group.DELETE("/componentclass", controller.DeleteComponentClassify) group.PUT("/componentclass", controller.UpdateComponentClassify) //组件列表 group.POST("/componentall", controller.ComponentListAll) group.POST("/componentList", controller.AddComponentList) group.PUT("/componentList", controller.UpdateComponentList) group.DELETE("/componentList", controller.DeleteComponentList) }