-
Notifications
You must be signed in to change notification settings - Fork 5
Product Review Plugin: Unable to upsert from sdk.store.productReviews.upsert #33
Copy link
Copy link
Closed
Description
Unable to upsert from sdk.store.productReviews.upsert.
My function is
export const addProductReview = async (input: StoreUpsertProductReviewsDTO,
) => {
const headers = {
...(await getAuthHeaders()),
}
return sdk.store.productReviews.upsert(
input,
headers
)
}
and
const handleSubmit = async (e: React.FormEvent<HTMLFormElement>) => {
if (!content || !rating) {
toast.error("Error", {
description: "Please fill in all required fields.",
})
return
}
e.preventDefault()
setIsLoading(true)
addProductReview({
reviews: [{
order_id: orderId,
order_line_item_id: lineItem.id,
content: content,
rating: rating,
images: []
}]
My order ID and order line item ID is should be correct as in the database my order line item id product id and order id is the same, I am not using request Id but I don't think it affects the ability to upsert

Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels