message.go 393 B

123456789101112131415
  1. package routers
  2. import (
  3. "github.com/gin-gonic/gin"
  4. "hongze/hongze_yb/controller/message"
  5. "hongze/hongze_yb/middleware"
  6. )
  7. func InitMessage(r *gin.Engine) {
  8. rGroup := r.Group("/api/message").Use(middleware.Token())
  9. rGroup.GET("/list", message.List)
  10. rGroup.POST("/batch/read", message.BatchRead)
  11. rGroup.POST("/read", message.SingleRead)
  12. rGroup.POST("/delete", message.SingleDelete)
  13. }