group_api.go 370 B

123456789101112131415161718
  1. package routers
  2. import (
  3. "tmr-watch/http/handle/group"
  4. "github.com/gin-gonic/gin"
  5. )
  6. func GroupAPI(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. apiPasture := s.Group("/pasture")
  12. apiPasture.POST("feed_formula/distribute", group.DistributeFeedFormula) // 饲料配方下发
  13. }
  14. }