refactor(datasource): remove WeCom document integration and related components

- Deleted WeCom document connector and callback handling code to streamline the datasource management.
- Removed associated localization entries and UI elements related to WeCom integration.
- Updated data source management logic to eliminate references to WeCom, enhancing maintainability and clarity.
- Adjusted error handling and logging to reflect the removal of WeCom-specific functionality.
This commit is contained in:
wizardchen
2026-03-30 19:33:17 +08:00
committed by lyingbug
parent 53bd412cf6
commit 1a340a8374
19 changed files with 36 additions and 1528 deletions
-10
View File
@@ -61,7 +61,6 @@ type RouterParams struct {
OrganizationHandler *handler.OrganizationHandler
IMHandler *handler.IMHandler
DataSourceHandler *handler.DataSourceHandler
WecomCallbackHandler *handler.WecomCallbackHandler
}
// NewRouter 创建新的路由
@@ -110,9 +109,6 @@ func NewRouter(params RouterParams) *gin.Engine {
// IM 回调路由(在认证中间件之前注册,使用各平台自身的签名验证)
RegisterIMRoutes(r, params.IMHandler)
// WeCom callback verification (before auth — WeCom uses its own signature)
RegisterWecomCallbackRoutes(r, params.WecomCallbackHandler)
// 认证中间件
r.Use(middleware.Auth(params.TenantService, params.UserService, params.Config))
@@ -780,9 +776,3 @@ func RegisterDataSourceRoutes(r *gin.RouterGroup, handler *handler.DataSourceHan
}
}
// RegisterWecomCallbackRoutes registers the WeCom callback verification route.
// Must be registered BEFORE auth middleware since WeCom uses its own msg_signature verification.
func RegisterWecomCallbackRoutes(r *gin.Engine, h *handler.WecomCallbackHandler) {
r.GET("/api/v1/wecom/callback/:datasource_id", h.HandleCallback)
r.POST("/api/v1/wecom/callback/:datasource_id", h.HandleCallback)
}