Init
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
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)
|
||||
}
|
||||
Reference in New Issue
Block a user