Files
ai-agent/internal/controllers/open/im_widget_controller.go
T
mlogclub efe801b8bf Init
2026-04-09 10:01:23 +08:00

26 lines
491 B
Go

package open
import (
"cs-agent/internal/pkg/dto/response"
"cs-agent/internal/pkg/irisx"
"github.com/kataras/iris/v12"
"github.com/mlogclub/simple/web"
)
type ImWidgetController struct {
Ctx iris.Context
}
func (c *ImWidgetController) AnyConfig() *web.JsonResult {
channel := irisx.GetChannel(c.Ctx)
if channel == nil {
return web.JsonErrorMsg("接入渠道未初始化")
}
ret := response.WidgetConfigResponse{
ChannelID: channel.ChannelID,
}
return web.JsonData(ret)
}