ok
This commit is contained in:
@@ -121,11 +121,11 @@ export async function updateItem(
|
||||
selectedImage,
|
||||
description);
|
||||
const formData = new FormData();
|
||||
formData.append("name", name);
|
||||
formData.append("price", price);
|
||||
formData.append("image", selectedImage);
|
||||
formData.append("description", description);
|
||||
formData.append("promoPrice", promoPrice);
|
||||
if(name != null )formData.append("name", name);
|
||||
if(price != null )formData.append("price", price);
|
||||
if(selectedImage != null )formData.append("image", selectedImage);
|
||||
if(description != null )formData.append("description", description);
|
||||
if(promoPrice != null )formData.append("promoPrice", promoPrice);
|
||||
|
||||
const response = await fetch(`${API_BASE_URL}/item/set-item/${itemId}`, {
|
||||
method: "PUT",
|
||||
|
||||
Reference in New Issue
Block a user