feat: implement multi-tenancy support across knowledge services and normalize TenantId to string type.

This commit is contained in:
2026-05-03 17:52:12 +02:00
parent eac0e9057e
commit e21c24b66d
16 changed files with 334 additions and 94 deletions
@@ -18,20 +18,13 @@ internal sealed class GetKnowledgeGraphQueryHandler : IQueryHandler<GetKnowledge
if (string.IsNullOrWhiteSpace(request.Text))
return Result.Ok(new GraphDataDto());
var result = await _knowledgeService.GetGraphDataAsync(request.Text, cancellationToken);
var result = await _knowledgeService.GetGraphDataAsync(request.Text, request.TenantId, cancellationToken);
if (result.IsFailed)
return Result.Fail<GraphDataDto>(result.Errors);
var graph = result.Value.Graph;
if (graph is null)
return Result.Ok(new GraphDataDto());
if (graph is null)
return Result.Ok(new GraphDataDto());
return Result.Ok(graph);
return graph is null ? Result.Ok(new GraphDataDto()) : Result.Ok(graph);
}
}