From 647ad4c4028b0e00d7ebaf4fd99d800ed3307cdf Mon Sep 17 00:00:00 2001 From: Basil Kotov Date: Thu, 24 Oct 2024 09:31:31 +0100 Subject: [PATCH 1/9] use UserId to search seo entity --- src/VirtoCommerce.Xapi.Core/Queries/SlugInfoQuery.cs | 3 ++- src/VirtoCommerce.Xapi.Core/VirtoCommerce.Xapi.Core.csproj | 2 +- src/VirtoCommerce.Xapi.Data/Queries/SlugInfoQueryHandler.cs | 1 + 3 files changed, 4 insertions(+), 2 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 c8361dc..65379de 100644 --- a/src/VirtoCommerce.Xapi.Core/VirtoCommerce.Xapi.Core.csproj +++ b/src/VirtoCommerce.Xapi.Core/VirtoCommerce.Xapi.Core.csproj @@ -29,7 +29,7 @@ - + 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); From 39f350727a4cf2cd0f1e60a7448762fd7aa1b8b1 Mon Sep 17 00:00:00 2001 From: Basil Kotov Date: Mon, 18 Nov 2024 12:45:43 +0000 Subject: [PATCH 2/9] update core module --- src/VirtoCommerce.Xapi.Core/VirtoCommerce.Xapi.Core.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/VirtoCommerce.Xapi.Core/VirtoCommerce.Xapi.Core.csproj b/src/VirtoCommerce.Xapi.Core/VirtoCommerce.Xapi.Core.csproj index f2d8493..5545b4b 100644 --- a/src/VirtoCommerce.Xapi.Core/VirtoCommerce.Xapi.Core.csproj +++ b/src/VirtoCommerce.Xapi.Core/VirtoCommerce.Xapi.Core.csproj @@ -30,7 +30,7 @@ - + From 53addef862c3d5f2e6e3034d6cc17467078821c2 Mon Sep 17 00:00:00 2001 From: Basil Kotov Date: Mon, 18 Nov 2024 15:37:48 +0000 Subject: [PATCH 3/9] up dependencies --- .../Pipelines/ServiceProviderMiddlewareResolver.cs | 5 +++-- .../VirtoCommerce.Xapi.Core.csproj | 12 ++++++------ .../VirtoCommerce.Xapi.Data.csproj | 2 +- src/VirtoCommerce.Xapi.Web/module.manifest | 2 +- .../VirtoCommerce.Xapi.Tests.csproj | 11 +++++++++-- 5 files changed, 20 insertions(+), 12 deletions(-) diff --git a/src/VirtoCommerce.Xapi.Core/Pipelines/ServiceProviderMiddlewareResolver.cs b/src/VirtoCommerce.Xapi.Core/Pipelines/ServiceProviderMiddlewareResolver.cs index 6928cda..a028ad9 100644 --- a/src/VirtoCommerce.Xapi.Core/Pipelines/ServiceProviderMiddlewareResolver.cs +++ b/src/VirtoCommerce.Xapi.Core/Pipelines/ServiceProviderMiddlewareResolver.cs @@ -12,9 +12,10 @@ public ServiceProviderMiddlewareResolver(IServiceProvider serviceProvider) _serviceProvider = serviceProvider; } - public object Resolve(Type type) + public MiddlewareResolverResult Resolve(Type type) { - return _serviceProvider.GetService(type); + var result = _serviceProvider.GetService(type); + return new MiddlewareResolverResult { IsDisposable = true, Middleware = result }; } } } diff --git a/src/VirtoCommerce.Xapi.Core/VirtoCommerce.Xapi.Core.csproj b/src/VirtoCommerce.Xapi.Core/VirtoCommerce.Xapi.Core.csproj index 5545b4b..ed90de1 100644 --- a/src/VirtoCommerce.Xapi.Core/VirtoCommerce.Xapi.Core.csproj +++ b/src/VirtoCommerce.Xapi.Core/VirtoCommerce.Xapi.Core.csproj @@ -27,13 +27,13 @@ - + - + - - - - + + + + \ No newline at end of file diff --git a/src/VirtoCommerce.Xapi.Data/VirtoCommerce.Xapi.Data.csproj b/src/VirtoCommerce.Xapi.Data/VirtoCommerce.Xapi.Data.csproj index 09c30d5..1a7bd06 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..245adb8 100644 --- a/tests/VirtoCommerce.Xapi.Tests/VirtoCommerce.Xapi.Tests.csproj +++ b/tests/VirtoCommerce.Xapi.Tests/VirtoCommerce.Xapi.Tests.csproj @@ -12,13 +12,20 @@ runtime; build; native; contentfiles; analyzers; buildtransitive all - + - + + + + + + + + From 41b2be12148e91ad75282b786c59ae62c9d30710 Mon Sep 17 00:00:00 2001 From: Basil Kotov Date: Mon, 18 Nov 2024 15:38:27 +0000 Subject: [PATCH 4/9] up tax module --- src/VirtoCommerce.Xapi.Web/module.manifest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/VirtoCommerce.Xapi.Web/module.manifest b/src/VirtoCommerce.Xapi.Web/module.manifest index 332536a..1e1c8a4 100644 --- a/src/VirtoCommerce.Xapi.Web/module.manifest +++ b/src/VirtoCommerce.Xapi.Web/module.manifest @@ -10,7 +10,7 @@ - + From ee7389d7d7a6eeca0a5b87d2ab8ac7ca7a1eadf1 Mon Sep 17 00:00:00 2001 From: Basil Kotov Date: Mon, 18 Nov 2024 16:10:03 +0000 Subject: [PATCH 5/9] fix dependencies versions --- src/VirtoCommerce.Xapi.Web/module.manifest | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/VirtoCommerce.Xapi.Web/module.manifest b/src/VirtoCommerce.Xapi.Web/module.manifest index 1e1c8a4..f6bebc2 100644 --- a/src/VirtoCommerce.Xapi.Web/module.manifest +++ b/src/VirtoCommerce.Xapi.Web/module.manifest @@ -7,9 +7,9 @@ 3.861.0 - - - + + + From 97e58aef31c77f86179b176a4db606f33e27d48c Mon Sep 17 00:00:00 2001 From: Basil Kotov Date: Mon, 18 Nov 2024 16:34:18 +0000 Subject: [PATCH 6/9] set wcorrect platform version --- src/VirtoCommerce.Xapi.Web/module.manifest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/VirtoCommerce.Xapi.Web/module.manifest b/src/VirtoCommerce.Xapi.Web/module.manifest index f6bebc2..a226122 100644 --- a/src/VirtoCommerce.Xapi.Web/module.manifest +++ b/src/VirtoCommerce.Xapi.Web/module.manifest @@ -4,7 +4,7 @@ 3.813.0 - 3.861.0 + 3.865.0 From 56c48b8148692745466f4c453dec6b5c666d79d0 Mon Sep 17 00:00:00 2001 From: Basil Kotov Date: Tue, 19 Nov 2024 08:15:58 +0000 Subject: [PATCH 7/9] set modules versions --- .../VirtoCommerce.Xapi.Core.csproj | 10 +++++----- .../VirtoCommerce.Xapi.Data.csproj | 2 +- src/VirtoCommerce.Xapi.Web/module.manifest | 12 ++++++------ 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/VirtoCommerce.Xapi.Core/VirtoCommerce.Xapi.Core.csproj b/src/VirtoCommerce.Xapi.Core/VirtoCommerce.Xapi.Core.csproj index ed90de1..ff4457d 100644 --- a/src/VirtoCommerce.Xapi.Core/VirtoCommerce.Xapi.Core.csproj +++ b/src/VirtoCommerce.Xapi.Core/VirtoCommerce.Xapi.Core.csproj @@ -29,11 +29,11 @@ - + - - - - + + + + \ No newline at end of file diff --git a/src/VirtoCommerce.Xapi.Data/VirtoCommerce.Xapi.Data.csproj b/src/VirtoCommerce.Xapi.Data/VirtoCommerce.Xapi.Data.csproj index 1a7bd06..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 a226122..5afa639 100644 --- a/src/VirtoCommerce.Xapi.Web/module.manifest +++ b/src/VirtoCommerce.Xapi.Web/module.manifest @@ -4,13 +4,13 @@ 3.813.0 - 3.865.0 + 3.861.0 - - - - - + + + + + From 2bc16bfc1be108f37c4a1725cb894a4f9c2dfe47 Mon Sep 17 00:00:00 2001 From: Basil Kotov Date: Tue, 19 Nov 2024 09:54:20 +0000 Subject: [PATCH 8/9] fix spaces --- src/VirtoCommerce.Xapi.Web/module.manifest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/VirtoCommerce.Xapi.Web/module.manifest b/src/VirtoCommerce.Xapi.Web/module.manifest index 5afa639..332536a 100644 --- a/src/VirtoCommerce.Xapi.Web/module.manifest +++ b/src/VirtoCommerce.Xapi.Web/module.manifest @@ -6,7 +6,7 @@ 3.861.0 - + From 323b94f0001549812041f9fc9679008f30cfa4dd Mon Sep 17 00:00:00 2001 From: Basil Kotov Date: Thu, 21 Nov 2024 09:35:21 +0000 Subject: [PATCH 9/9] update dependencies --- .../Pipelines/ServiceProviderMiddlewareResolver.cs | 5 ++--- .../VirtoCommerce.Xapi.Core.csproj | 8 +++++++- .../VirtoCommerce.Xapi.Tests.csproj | 7 ------- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/src/VirtoCommerce.Xapi.Core/Pipelines/ServiceProviderMiddlewareResolver.cs b/src/VirtoCommerce.Xapi.Core/Pipelines/ServiceProviderMiddlewareResolver.cs index a028ad9..6928cda 100644 --- a/src/VirtoCommerce.Xapi.Core/Pipelines/ServiceProviderMiddlewareResolver.cs +++ b/src/VirtoCommerce.Xapi.Core/Pipelines/ServiceProviderMiddlewareResolver.cs @@ -12,10 +12,9 @@ public ServiceProviderMiddlewareResolver(IServiceProvider serviceProvider) _serviceProvider = serviceProvider; } - public MiddlewareResolverResult Resolve(Type type) + public object Resolve(Type type) { - var result = _serviceProvider.GetService(type); - return new MiddlewareResolverResult { IsDisposable = true, Middleware = result }; + return _serviceProvider.GetService(type); } } } diff --git a/src/VirtoCommerce.Xapi.Core/VirtoCommerce.Xapi.Core.csproj b/src/VirtoCommerce.Xapi.Core/VirtoCommerce.Xapi.Core.csproj index ff4457d..739aa56 100644 --- a/src/VirtoCommerce.Xapi.Core/VirtoCommerce.Xapi.Core.csproj +++ b/src/VirtoCommerce.Xapi.Core/VirtoCommerce.Xapi.Core.csproj @@ -27,7 +27,7 @@ - + @@ -36,4 +36,10 @@ + + + + + + \ No newline at end of file diff --git a/tests/VirtoCommerce.Xapi.Tests/VirtoCommerce.Xapi.Tests.csproj b/tests/VirtoCommerce.Xapi.Tests/VirtoCommerce.Xapi.Tests.csproj index 245adb8..f3afcb7 100644 --- a/tests/VirtoCommerce.Xapi.Tests/VirtoCommerce.Xapi.Tests.csproj +++ b/tests/VirtoCommerce.Xapi.Tests/VirtoCommerce.Xapi.Tests.csproj @@ -19,13 +19,6 @@ - - - - - - -