JM-WechatMini/router/app/login.go
2023-11-02 04:34:46 +08:00

21 lines
466 B
Go

package app
import (
"github.com/gin-gonic/gin"
v1 "miniapp/api/v1"
)
type LoginRouter struct{}
func (s *LoginRouter) InitLoginRouter(Router *gin.RouterGroup) {
loginRouter := Router.Group("login")
baseApi := v1.ApiGroupApp.AppApiGroup.LoginApi
{
loginRouter.GET("wechat/token", baseApi.GetWeChatToken)
loginRouter.POST("token", baseApi.Login)
loginRouter.POST("token/refresh", baseApi.Refresh)
loginRouter.POST("token/logout", baseApi.Logout)
}
}