comment.go 370 B

123456789101112131415
  1. package routers
  2. import (
  3. "github.com/gin-gonic/gin"
  4. "hongze/hongze_yb/controller/comment"
  5. "hongze/hongze_yb/middleware"
  6. )
  7. func InitComment(r *gin.Engine) {
  8. rGroup := r.Group("/api/comment").Use(middleware.Token())
  9. rGroup.POST("/set", comment.Comment)
  10. rGroup.POST("/del", comment.Delete)
  11. rGroup.GET("/hot", comment.HotList)
  12. rGroup.GET("/my", comment.MyList)
  13. }