From fc01375a8d4f2a44638e053b302f027080642a56 Mon Sep 17 00:00:00 2001 From: Shahed Nasser Date: Tue, 17 Oct 2023 19:57:36 +0300 Subject: [PATCH] docs: fix q parameter in search products section (#5399) --- .../modules/products/storefront/show-products.mdx | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/www/apps/docs/content/modules/products/storefront/show-products.mdx b/www/apps/docs/content/modules/products/storefront/show-products.mdx index ac779a8d0c..452bbaafe3 100644 --- a/www/apps/docs/content/modules/products/storefront/show-products.mdx +++ b/www/apps/docs/content/modules/products/storefront/show-products.mdx @@ -606,9 +606,15 @@ medusa.products.search({ ```ts -fetch(`/store/products/search?q=Shirt`, { +fetch(`/store/products/search`, { credentials: "include", method: "POST", + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify({ + q: "Shirt" + }) }) .then((response) => response.json()) .then(({ hits }) => { @@ -620,7 +626,11 @@ fetch(`/store/products/search?q=Shirt`, { ```bash -curl -L -X POST '/store/products/search?q=Shirt' +curl -L -X POST '/store/products/search?q=Shirt' \ +-H 'Content-Type: application/json' \ +--data-raw '{ + "q": "Shirt" +}' ```