voice_broadcast.go 927 B

1234567891011121314151617181920212223
  1. package routers
  2. import (
  3. "github.com/gin-gonic/gin"
  4. "hongze/hongze_yb/controller/voice_broadcast"
  5. "hongze/hongze_yb/middleware"
  6. )
  7. func InitVoiceBroadcast(r *gin.Engine) {
  8. rGroup := r.Group("api/voice/broadcast").Use(middleware.Token())
  9. rGroup.POST("/add", voice_broadcast.AddBroadcast)
  10. rGroup.POST("/edit", voice_broadcast.EditBroadcast)
  11. rGroup.POST("/publish", voice_broadcast.PublishBroadcast)
  12. rGroup.GET("/section/list", voice_broadcast.SectionList)
  13. rGroup.GET("/delete", voice_broadcast.DelBroadcast)
  14. rGroup.POST("/statistics/add", voice_broadcast.AddStatistics)
  15. // 权限校验
  16. rGroup2 := r.Group("api/voice/broadcast").Use(middleware.Token(), middleware.CheckBaseAuth())
  17. rGroup2.POST("/list", voice_broadcast.BroadcastList)
  18. rGroup2.GET("/detail", voice_broadcast.BroadcastDetail)
  19. rGroup2.POST("/msg_send", voice_broadcast.MsgSend)
  20. rGroup2.GET("/list_count", voice_broadcast.MyVoiceBroadcastListCount)
  21. }