pasture.go 353 B

123456789101112131415161718
  1. package route
  2. import (
  3. "kpt-tmr-group/http/handler/pasture"
  4. "github.com/gin-gonic/gin"
  5. )
  6. func PastureAPI(opts ...func(engine *gin.Engine)) func(s *gin.Engine) {
  7. return func(s *gin.Engine) {
  8. for _, opt := range opts {
  9. opt(s)
  10. }
  11. s.POST("/group/class/sync", pasture.CategorySync)
  12. s.POST("/group/class/delete", pasture.CategoryDelete)
  13. }
  14. }