refactor: Update tenant ID handling across the application

This commit is contained in:
wizardchen
2025-11-25 16:30:54 +08:00
parent 9f6f5f5773
commit 64c44c9e27
78 changed files with 437 additions and 601 deletions
+3 -3
View File
@@ -69,7 +69,7 @@ func (h *Handler) CreateSession(c *gin.Context) {
logger.Infof(
ctx,
"Processing session creation request, tenant ID: %d, knowledge base ID: %s, agent mode: %v, agent KBs: %v",
tenantID.(uint),
tenantID,
request.KnowledgeBaseID,
isAgentMode,
hasAgentKnowledgeBases,
@@ -77,7 +77,7 @@ func (h *Handler) CreateSession(c *gin.Context) {
// Create session object with base properties
createdSession := &types.Session{
TenantID: tenantID.(uint),
TenantID: tenantID.(uint64),
KnowledgeBaseID: request.KnowledgeBaseID,
AgentConfig: request.AgentConfig, // Set agent config if provided
}
@@ -281,7 +281,7 @@ func (h *Handler) UpdateSession(c *gin.Context) {
}
session.ID = id
session.TenantID = tenantID.(uint)
session.TenantID = tenantID.(uint64)
// Call service to update session
if err := h.sessionService.UpdateSession(ctx, &session); err != nil {