new_api.go 339 B

1234567891011121314151617
  1. package routers
  2. import (
  3. "tmr-watch/http/handle/api"
  4. "github.com/gin-gonic/gin"
  5. )
  6. func NewAPI(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. newApiGroup := s.Group("/new_api")
  12. newApiGroup.POST("feet_template/list", api.SearchFeetTemplateList)
  13. }
  14. }