Skip to content

Commit

Permalink
Rollback
Browse files Browse the repository at this point in the history
  • Loading branch information
Juliana M. Crivelli authored Nov 17, 2023
1 parent 3c5e99a commit 711b857
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions dotnet/Services/ProductReviewService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ public async Task<ReviewsResponseWrapper> GetReviewsByProductId(string productId
{
string searchQuery = string.Empty;
string ratingQuery = string.Empty;
string localeQuery = $"(locale={locale}-*)";
string localeQuery = string.Empty;
bool ratingFilter = rating > 0 && rating <= 5;
bool pastRevNLocale = pastReviews && !string.IsNullOrEmpty(locale);
ReviewsResponseWrapper wrapper = new ReviewsResponseWrapper();
Expand Down Expand Up @@ -449,8 +449,12 @@ public async Task<ReviewsResponseWrapper> GetReviewsByProductId(string productId
{
searchQuery = $"{searchQuery}&approved=true";
}
if (!string.IsNullOrEmpty(locale))
{
localeQuery = $"&locale={locale}-*";
}

wrapper = await this._productReviewRepository.GetProductReviewsMD($"productId={productId}{sort}{searchQuery}{ratingQuery}&{localeQuery}", from.ToString(), to.ToString());
wrapper = await this._productReviewRepository.GetProductReviewsMD($"productId={productId}{sort}{searchQuery}{ratingQuery}{localeQuery}", from.ToString(), to.ToString());
}
}
catch (Exception ex)
Expand Down

0 comments on commit 711b857

Please sign in to comment.