From e556912ff3bbd96a9bed26b191033840cbe51d97 Mon Sep 17 00:00:00 2001 From: seunghyun Date: Mon, 8 Jul 2024 03:53:42 +0900 Subject: [PATCH] =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/api.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/api/api.js b/src/api/api.js index fc0432e0a..12d1b62ba 100644 --- a/src/api/api.js +++ b/src/api/api.js @@ -20,8 +20,7 @@ export async function getProducts( } } -export async function getDetailProduct(productId) { - // throw new Error("error"); +export async function getDetailProduct({ productId }) { try { const response = await fetch(`${PRODUCTS_URL}/${productId}`); if (!response.ok) { @@ -35,7 +34,7 @@ export async function getDetailProduct(productId) { } } -export async function getComments(productId) { +export async function getComments({ productId }) { try { const response = await fetch( `${PRODUCTS_URL}/${productId}/comments?limit=5`