diff --git a/product-delete-action.php b/product-delete-action.php index 685ae40..f259992 100644 --- a/product-delete-action.php +++ b/product-delete-action.php @@ -1,7 +1,8 @@ 'https://api.obanana.shop/api/v1/products/656717579624f6181c49cdda', diff --git a/vendor-all-product-list.php b/vendor-all-product-list.php index 917c25a..6dacb2c 100644 --- a/vendor-all-product-list.php +++ b/vendor-all-product-list.php @@ -171,7 +171,7 @@ $products = productList(); if (isset($product['product_image']) && !empty($product['product_image'])) { echo 'Product Image'; } else { - echo 'Placeholder Image'; + echo 'Placeholder Image'; } ?> diff --git a/vendor-uploads.php b/vendor-uploads.php index 6b92f98..47030c9 100644 --- a/vendor-uploads.php +++ b/vendor-uploads.php @@ -485,24 +485,6 @@ $array = json_decode($result, true); formData.append('category', 'product'); formData.append('image', resizedFile); - fetch('https:///api/v1/upload_image', { - method: 'POST', - body: formData - }) - .then(response => { - if (response.ok) { - return response.json(); - } else { - console.error('File upload failed'); - throw new Error('File upload failed'); - } - }) - .then(result => { - const filename = result.filename; - - const payload = { - product_image: `https:///images/storage/product_uploads/${filename}`, - }; fetch('https:///api/v1/upload_image', { method: 'POST', body: formData