collection.go 357 B

1234567891011121314
  1. package routers
  2. import (
  3. "github.com/gin-gonic/gin"
  4. "hongze/hongze_yb/controller/collection"
  5. "hongze/hongze_yb/middleware"
  6. )
  7. func InitCollection(r *gin.Engine) {
  8. rGroup := r.Group("/api/collection").Use(middleware.Token())
  9. rGroup.GET("/list", collection.List)
  10. rGroup.POST("/collect", collection.Collect)
  11. rGroup.POST("/cancel", collection.Cancel)
  12. }