Skip to content

Commit

Permalink
Merge pull request #389 from Ecwid/ECWID-136424-reviews-api
Browse files Browse the repository at this point in the history
ECWID-136424 Product reviews: review list page. Added filtering reviews by several rating values
  • Loading branch information
kitty-ecwid authored Mar 25, 2024
2 parents 495cc1b + 2ed470e commit ce111c8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ data class ProductReviewMassUpdate(
) : ApiRequestDTO {

data class Filters(
val reviewId: String? = null,
val productId: String? = null,
val orderId: String? = null,
val reviewId: List<Long>? = null,
val productId: List<Long>? = null,
val orderId: List<Long>? = null,
val status: ProductReviewStatus? = null,
val rating: Int? = null,
val rating: List<Int>? = null,
val createdFrom: Instant? = null,
val createdTo: Instant? = null,
val searchKeyword: String? = null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ data class ProductReviewSearchRequest(
val productId: String? = null,
val orderId: String? = null,
val status: ProductReviewStatus? = null,
val rating: Int? = null,
val rating: String? = null,
val createdFrom: Instant? = null,
val createdTo: Instant? = null,
val updatedFrom: Instant? = null,
Expand All @@ -40,7 +40,7 @@ data class ProductReviewSearchRequest(
request.productId?.let { put("productId", it) }
request.orderId?.let { put("orderId", it) }
request.status?.let { put("status", it.toString()) }
request.rating?.let { put("rating", it.toString()) }
request.rating?.let { put("rating", it) }
request.createdFrom?.let { put("createdFrom", TimeUnit.MILLISECONDS.toSeconds(it.toEpochMilli()).toString()) }
request.createdTo?.let { put("createdTo", TimeUnit.MILLISECONDS.toSeconds(it.toEpochMilli()).toString()) }
request.updatedFrom?.let { put("updatedFrom", TimeUnit.MILLISECONDS.toSeconds(it.toEpochMilli()).toString()) }
Expand Down

0 comments on commit ce111c8

Please sign in to comment.