admin.go 721 B

123456789101112131415161718192021
  1. package routers
  2. import (
  3. "Panel_development/app/controller"
  4. middlewares "Panel_development/app/middleware"
  5. "github.com/gin-gonic/gin"
  6. )
  7. func AdminRouter(r *gin.Engine) {
  8. group := r.Group("/api")
  9. group.Use(middlewares.AdminMiddleware())
  10. //组件分类
  11. group.POST("/addcomponentclass", controller.AddComponentClassify)
  12. group.DELETE("/componentclass", controller.DeleteComponentClassify)
  13. group.PUT("/componentclass", controller.UpdateComponentClassify)
  14. //组件列表
  15. group.POST("/componentall", controller.ComponentListAll)
  16. group.POST("/componentList", controller.AddComponentList)
  17. group.PUT("/componentList", controller.UpdateComponentList)
  18. group.DELETE("/componentList", controller.DeleteComponentList)
  19. }