change torob search , add version 0.27.35.57

release
Amir Hossein Khademi 2024-05-17 13:33:15 +03:30
parent 1ccbcd3074
commit f28e36e84e
5 changed files with 6 additions and 6 deletions

View File

@ -1 +1 @@
0.27.34.55
0.27.35.57

View File

@ -26,7 +26,6 @@ public class SearchController : ICarterModule
private async Task<IResult> SearchThumbAsync([FromQuery] string name, [FromServices] ISearchService searchService, CancellationToken cancellationToken)
=> TypedResults.Ok(await searchService.ThumbSearchAsync(name, cancellationToken));
private async Task<IResult> SearchAsync([FromQuery] string name, [FromServices] ISearchService searchService, CancellationToken cancellationToken)
=> TypedResults.Ok(await searchService.SearchAsync(name, cancellationToken));

View File

@ -6,8 +6,8 @@
<ImplicitUsings>enable</ImplicitUsings>
<InvariantGlobalization>true</InvariantGlobalization>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
<AssemblyVersion>0.27.33.54</AssemblyVersion>
<FileVersion>0.27.33.54</FileVersion>
<AssemblyVersion>0.27.35.57</AssemblyVersion>
<FileVersion>0.27.35.57</FileVersion>
</PropertyGroup>
<ItemGroup>

View File

@ -8,7 +8,7 @@ string env = builder.Environment.IsDevelopment() == true ? "Development" : "Prod
builder.Host.UseContentRoot(Directory.GetCurrentDirectory());
if (builder.Environment.IsDevelopment())
{
string projectName = "Vesmeh";
string projectName = "Hamyan";
builder.Configuration.AddJsonFile($"AppSettings/appsettings.json").AddJsonFile($"AppSettings/appsettings.{env}{projectName}.json");
}

View File

@ -16,6 +16,7 @@ public class GetTorobProductsQueryHandler : IRequestHandler<GetTorobProductsQuer
}
public async Task<List<TorobProductResponseDto>> Handle(GetTorobProductsQuery request, CancellationToken cancellationToken)
{
int page = request.Page == 0 ? 1 : request.Page;
var productsSDto = await _repositoryWrapper.SetRepository<Product>()
.TableNoTracking
.OrderByDescending(p => p.ModifiedAt == DateTime.MinValue ? p.CreatedAt : p.ModifiedAt)
@ -32,7 +33,7 @@ public class GetTorobProductsQueryHandler : IRequestHandler<GetTorobProductsQuer
Slug = p.Slug,
})
.Skip(request.Page * 100)
.Skip(page * 100)
.Take(100)
.ToListAsync(cancellationToken);