From 2cc8ee799c10fdb1d16d14257e2e43bf9e2baab9 Mon Sep 17 00:00:00 2001 From: Basil Kotov Date: Fri, 22 Nov 2024 08:46:37 +0100 Subject: [PATCH 1/2] VCST-2012: Use UserId when searching for SEO entities (#15) * use UserId to search seo entity * update core module * up dependencies * up tax module * fix dependencies versions * set wcorrect platform version * set modules versions * fix spaces * update dependencies --- src/VirtoCommerce.Xapi.Core/Queries/SlugInfoQuery.cs | 3 ++- .../VirtoCommerce.Xapi.Core.csproj | 8 +++++++- .../Queries/SlugInfoQueryHandler.cs | 1 + .../VirtoCommerce.Xapi.Data.csproj | 2 +- src/VirtoCommerce.Xapi.Web/module.manifest | 2 +- .../VirtoCommerce.Xapi.Tests.csproj | 4 ++-- 6 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/VirtoCommerce.Xapi.Core/Queries/SlugInfoQuery.cs b/src/VirtoCommerce.Xapi.Core/Queries/SlugInfoQuery.cs index c6842e0..e502450 100644 --- a/src/VirtoCommerce.Xapi.Core/Queries/SlugInfoQuery.cs +++ b/src/VirtoCommerce.Xapi.Core/Queries/SlugInfoQuery.cs @@ -3,6 +3,7 @@ using GraphQL; using GraphQL.Types; using VirtoCommerce.Xapi.Core.BaseQueries; +using VirtoCommerce.Xapi.Core.Extensions; using VirtoCommerce.Xapi.Core.Models; namespace VirtoCommerce.Xapi.Core.Queries @@ -39,7 +40,7 @@ public override void Map(IResolveFieldContext context) #pragma warning restore VC0008 Permalink = context.GetArgument(nameof(Permalink)); StoreId = context.GetArgument(nameof(StoreId)); - UserId = context.GetArgument(nameof(UserId)); + UserId = context.GetCurrentUserId(); CultureName = context.GetArgument(nameof(CultureName)); } } diff --git a/src/VirtoCommerce.Xapi.Core/VirtoCommerce.Xapi.Core.csproj b/src/VirtoCommerce.Xapi.Core/VirtoCommerce.Xapi.Core.csproj index 5d8faa3..739aa56 100644 --- a/src/VirtoCommerce.Xapi.Core/VirtoCommerce.Xapi.Core.csproj +++ b/src/VirtoCommerce.Xapi.Core/VirtoCommerce.Xapi.Core.csproj @@ -30,10 +30,16 @@ - + + + + + + + \ No newline at end of file diff --git a/src/VirtoCommerce.Xapi.Data/Queries/SlugInfoQueryHandler.cs b/src/VirtoCommerce.Xapi.Data/Queries/SlugInfoQueryHandler.cs index 5cb7ab2..c9f532c 100644 --- a/src/VirtoCommerce.Xapi.Data/Queries/SlugInfoQueryHandler.cs +++ b/src/VirtoCommerce.Xapi.Data/Queries/SlugInfoQueryHandler.cs @@ -49,6 +49,7 @@ public async Task Handle(SlugInfoQuery request, CancellationTo criteria.LanguageCode = currentCulture; criteria.Permalink = request.Permalink; criteria.Slug = lastSegment; + criteria.UserId = request.UserId; result.EntityInfo = await GetBestMatchingSeoInfo(criteria, store); diff --git a/src/VirtoCommerce.Xapi.Data/VirtoCommerce.Xapi.Data.csproj b/src/VirtoCommerce.Xapi.Data/VirtoCommerce.Xapi.Data.csproj index 09c30d5..f0a7f40 100644 --- a/src/VirtoCommerce.Xapi.Data/VirtoCommerce.Xapi.Data.csproj +++ b/src/VirtoCommerce.Xapi.Data/VirtoCommerce.Xapi.Data.csproj @@ -10,7 +10,7 @@ - + diff --git a/src/VirtoCommerce.Xapi.Web/module.manifest b/src/VirtoCommerce.Xapi.Web/module.manifest index 90a176f..332536a 100644 --- a/src/VirtoCommerce.Xapi.Web/module.manifest +++ b/src/VirtoCommerce.Xapi.Web/module.manifest @@ -6,7 +6,7 @@ 3.861.0 - + diff --git a/tests/VirtoCommerce.Xapi.Tests/VirtoCommerce.Xapi.Tests.csproj b/tests/VirtoCommerce.Xapi.Tests/VirtoCommerce.Xapi.Tests.csproj index 33b1380..f3afcb7 100644 --- a/tests/VirtoCommerce.Xapi.Tests/VirtoCommerce.Xapi.Tests.csproj +++ b/tests/VirtoCommerce.Xapi.Tests/VirtoCommerce.Xapi.Tests.csproj @@ -12,10 +12,10 @@ runtime; build; native; contentfiles; analyzers; buildtransitive all - + - + From e3bf4a56e1fe99a1569c94c3c443ad41715ac0b2 Mon Sep 17 00:00:00 2001 From: vc-ci Date: Fri, 22 Nov 2024 08:02:25 +0000 Subject: [PATCH 2/2] 3.814.0 --- Directory.Build.props | 2 +- src/VirtoCommerce.Xapi.Web/module.manifest | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index fc6ccde..59428fc 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -2,7 +2,7 @@ - 3.813.0 + 3.814.0 $(VersionSuffix)-$(BuildNumber) diff --git a/src/VirtoCommerce.Xapi.Web/module.manifest b/src/VirtoCommerce.Xapi.Web/module.manifest index 332536a..54ce4fe 100644 --- a/src/VirtoCommerce.Xapi.Web/module.manifest +++ b/src/VirtoCommerce.Xapi.Web/module.manifest @@ -1,7 +1,7 @@ VirtoCommerce.Xapi - 3.813.0 + 3.814.0 3.861.0