package routers import ( "github.com/gin-gonic/gin" "hongze/hongze_yb/controller/voice_broadcast" "hongze/hongze_yb/middleware" ) func InitVoiceBroadcast(r *gin.Engine) { rGroup := r.Group("api/voice/broadcast").Use(middleware.Token()) rGroup.POST("/add", voice_broadcast.AddBroadcast) rGroup.POST("/edit", voice_broadcast.EditBroadcast) rGroup.POST("/publish", voice_broadcast.PublishBroadcast) rGroup.GET("/section/list", voice_broadcast.SectionList) rGroup.GET("/delete", voice_broadcast.DelBroadcast) rGroup.POST("/statistics/add", voice_broadcast.AddStatistics) // 权限校验 rGroup2 := r.Group("api/voice/broadcast").Use(middleware.Token(), middleware.CheckCygxAuth()) rGroup2.POST("/list", voice_broadcast.BroadcastList) rGroup2.GET("/detail", voice_broadcast.BroadcastDetail) rGroup2.POST("/msg_send", voice_broadcast.MsgSend) rGroup2.GET("/list_count", voice_broadcast.MyVoiceBroadcastListCount) }