Skip to content

Commit

Permalink
수정
Browse files Browse the repository at this point in the history
  • Loading branch information
leesh7048 committed Jul 7, 2024
1 parent e69c603 commit e556912
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/api/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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`
Expand Down

0 comments on commit e556912

Please sign in to comment.