123456789101112131415161718192021 |
- package routers
- import (
- "tmr-watch/http/handle/api"
- "github.com/gin-gonic/gin"
- )
- func NewAPI(opts ...func(engine *gin.Engine)) func(s *gin.Engine) {
- return func(s *gin.Engine) {
- for _, opt := range opts {
- opt(s)
- }
- newApiGroup := s.Group("/new_api")
- newApiGroup.POST("feet_template/list", api.SearchFeetTemplateList)
- newApiGroup.POST("feet_template/version", api.GetFeetTemplateVersion)
- newApiGroup.POST("feet_template/upgrade", api.FeetTemplateUpgradeNewVersion)
- newApiGroup.POST("tmr/gear", api.UpdateTmrGear)
- newApiGroup.POST("user/gear", api.UseGear)
- }
- }
|