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
+2 -2
View File
@@ -84,7 +84,7 @@ func (h *ModelHandler) CreateModel(c *gin.Context) {
return
}
tenantID := c.GetUint(types.TenantIDContextKey.String())
tenantID := c.GetUint64(types.TenantIDContextKey.String())
if tenantID == 0 {
logger.Error(ctx, "Tenant ID is empty")
c.Error(errors.NewBadRequestError("Tenant ID cannot be empty"))
@@ -173,7 +173,7 @@ func (h *ModelHandler) ListModels(c *gin.Context) {
logger.Info(ctx, "Start retrieving model list")
tenantID := c.GetUint(types.TenantIDContextKey.String())
tenantID := c.GetUint64(types.TenantIDContextKey.String())
if tenantID == 0 {
logger.Error(ctx, "Tenant ID is empty")
c.Error(errors.NewBadRequestError("Tenant ID cannot be empty"))