auth.go 448 B

12345678910111213141516
  1. package routers
  2. import (
  3. "eta_gn/eta_bridge/controller"
  4. "eta_gn/eta_bridge/middleware"
  5. "github.com/gin-gonic/gin"
  6. )
  7. func InitAuth(r *gin.RouterGroup) {
  8. //登录
  9. authController := new(controller.AuthController)
  10. authGroup := r.Group("auth/").Use(middleware.Token())
  11. authGroup.POST("auth_code", authController.CreateAuthCode)
  12. authGroup.POST("eta_token", authController.GetEtaToken)
  13. authGroup.POST("crm_token", authController.GetCrmToken)
  14. }