refactor: remove WeChat MP OAuth handling and related configurations

This commit is contained in:
mlogclub
2026-04-27 16:30:58 +08:00
parent 2220dcb0cb
commit cd9de63860
5 changed files with 8 additions and 350 deletions
@@ -8,7 +8,6 @@ import (
"github.com/kataras/iris/v12"
"github.com/mlogclub/simple/web"
"github.com/mlogclub/simple/web/params"
)
type ChannelController struct {
@@ -38,27 +37,6 @@ func (c *ChannelController) AnyConfig() *web.JsonResult {
return web.JsonData(ret)
}
func (c *ChannelController) AnyWechat_mpOauthAuthorize() *web.JsonResult {
channelID, _ := params.Get(c.Ctx, "channelId")
redirectURL, err := services.ChannelService.BuildWechatMPOAuthURL(c.Ctx, channelID)
if err != nil {
return web.JsonError(err)
}
c.Ctx.Redirect(redirectURL)
return nil
}
func (c *ChannelController) AnyWechat_mpOauthCallback() *web.JsonResult {
code, _ := params.Get(c.Ctx, "code")
state, _ := params.Get(c.Ctx, "state")
result, err := services.ChannelService.CompleteWechatMPOAuth(c.Ctx.Request().Context(), code, state)
if err != nil {
return web.JsonError(err)
}
c.Ctx.Redirect(services.BuildWechatMPChatRedirectURL(c.Ctx, result))
return nil
}
type webLikeWidgetConfig struct {
Title string
Subtitle string