feat: Refactor tenant configuration management to use KV API
- Updated tenant web search and agent configuration endpoints to utilize a KV-style API for better flexibility. - Enhanced the tenant handler to support generic key-value operations for retrieving and updating configurations. - Improved frontend API calls to align with the new KV API structure, ensuring consistent data handling. - Removed deprecated direct configuration endpoints for a cleaner and more maintainable codebase.
This commit is contained in:
@@ -222,14 +222,10 @@ func RegisterTenantRoutes(r *gin.RouterGroup, handler *handler.TenantHandler) {
|
||||
tenantRoutes.DELETE("/:id", handler.DeleteTenant)
|
||||
tenantRoutes.GET("", handler.ListTenants)
|
||||
|
||||
// Agent configuration management (tenant-level)
|
||||
// Generic KV configuration management (tenant-level)
|
||||
// Tenant ID is obtained from authentication context
|
||||
tenantRoutes.GET("/agent-config", handler.GetTenantAgentConfig)
|
||||
tenantRoutes.PUT("/agent-config", handler.UpdateTenantAgentConfig)
|
||||
// Web search configuration management (tenant-level)
|
||||
// Tenant ID is obtained from authentication context
|
||||
tenantRoutes.GET("/web-search-config", handler.GetTenantWebSearchConfig)
|
||||
tenantRoutes.PUT("/web-search-config", handler.UpdateTenantWebSearchConfig)
|
||||
tenantRoutes.GET("/kv/:key", handler.GetTenantKV)
|
||||
tenantRoutes.PUT("/kv/:key", handler.UpdateTenantKV)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user