1c48fbdeaf
- Added WeChat Official Account configuration options to .env.example and config.go for OAuth2 integration. - Updated main.go to initialize WeChat OAuth handler and register routes for handling OAuth requests. - Enhanced documentation to include references for WeChat Official Account functionality. - Updated route registration to accommodate the new OAuth handler for improved API structure.
16 lines
362 B
Go
16 lines
362 B
Go
package routes
|
|
|
|
import (
|
|
"github.com/gin-gonic/gin"
|
|
|
|
oahandler "wx_service/internal/common/wechat_official/handler"
|
|
)
|
|
|
|
func registerWeChatOfficialRoutes(api *gin.RouterGroup, oauthHandler *oahandler.OAuthHandler) {
|
|
// 微信公众号(网页授权 OAuth2)
|
|
oa := api.Group("/wechat/official")
|
|
{
|
|
oa.POST("/oauth/code2user", oauthHandler.CodeToUser)
|
|
}
|
|
}
|