Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VCST-2012: Use UserId when searching for SEO entities #15

Merged
merged 10 commits into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/VirtoCommerce.Xapi.Core/Queries/SlugInfoQuery.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -39,7 +40,7 @@ public override void Map(IResolveFieldContext context)
#pragma warning restore VC0008
Permalink = context.GetArgument<string>(nameof(Permalink));
StoreId = context.GetArgument<string>(nameof(StoreId));
UserId = context.GetArgument<string>(nameof(UserId));
UserId = context.GetCurrentUserId();
CultureName = context.GetArgument<string>(nameof(CultureName));
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/VirtoCommerce.Xapi.Core/VirtoCommerce.Xapi.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<PackageReference Include="GraphQL.Server.Transports.AspNetCore.NewtonsoftJson" Version="5.0.2" />
<PackageReference Include="PipelineNet" Version="0.9.0" />
<PackageReference Include="RedLock.net" Version="2.3.2" />
<PackageReference Include="VirtoCommerce.CoreModule.Core" Version="3.808.0" />
<PackageReference Include="VirtoCommerce.CoreModule.Core" Version="3.809.0-alpha.1627-vcst-2012" />
<PackageReference Include="VirtoCommerce.CustomerModule.Core" Version="3.817.0" />
<PackageReference Include="VirtoCommerce.SearchModule.Core" Version="3.804.0" />
<PackageReference Include="VirtoCommerce.StoreModule.Core" Version="3.809.0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ public async Task<SlugInfoResponse> Handle(SlugInfoQuery request, CancellationTo
criteria.LanguageCode = currentCulture;
criteria.Permalink = request.Permalink;
criteria.Slug = lastSegment;
criteria.UserId = request.UserId;

result.EntityInfo = await GetBestMatchingSeoInfo(criteria, store);

Expand Down
Loading