content.go 1.0 KB

123456789101112131415161718192021222324
  1. package autocode
  2. import (
  3. "github.com/flipped-aurora/gin-vue-admin/server/api/v1"
  4. "github.com/flipped-aurora/gin-vue-admin/server/middleware"
  5. "github.com/gin-gonic/gin"
  6. )
  7. type ContentRouter struct {
  8. }
  9. // InitContentRouter 初始化 Content 路由信息
  10. func (s *ContentRouter) InitContentRouter(Router *gin.RouterGroup) {
  11. contentRouter := Router.Group("content").Use(middleware.OperationRecord())
  12. var contentApi = v1.ApiGroupApp.AutoCodeApiGroup.ContentApi
  13. {
  14. contentRouter.POST("createContent", contentApi.CreateContent) // 新建Content
  15. contentRouter.DELETE("deleteContent", contentApi.DeleteContent) // 删除Content
  16. contentRouter.DELETE("deleteContentByIds", contentApi.DeleteContentByIds) // 批量删除Content
  17. contentRouter.PUT("updateContent", contentApi.UpdateContent) // 更新Content
  18. contentRouter.GET("findContent", contentApi.FindContent) // 根据ID获取Content
  19. contentRouter.GET("getContentList", contentApi.GetContentList) // 获取Content列表
  20. }
  21. }