From 13a2d67474cd6abfc82ebed4092e2b44407d4cd9 Mon Sep 17 00:00:00 2001 From: NW Date: Tue, 26 Nov 2024 09:31:06 +0000 Subject: [PATCH] rewrite sampleProduct --- .../adminHandlers/adminProductHandler.js | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/handlers/adminHandlers/adminProductHandler.js b/src/handlers/adminHandlers/adminProductHandler.js index 684198e..6312b9e 100644 --- a/src/handlers/adminHandlers/adminProductHandler.js +++ b/src/handlers/adminHandlers/adminProductHandler.js @@ -925,16 +925,16 @@ Coordinates: ${product.hidden_coordinates} const subcategoryId = product.subcategory_id; const sampleProduct = { - name: "Sample Product 1", - price: 100, - description: "Product description", - private_data: "Hidden details about the product", - quantity_in_stock: 10, - photo_url: "https://example.com/photo.jpg", - hidden_photo_url: "https://example.com/hidden.jpg", - hidden_coordinates: "40.7128,-74.0060", - hidden_description: "Secret location details" - } + name: product.name, + price: product.price, + description: product.description, + private_data: product.private_data, + quantity_in_stock: product.quantity_in_stock, + photo_url: product.photo_url, + hidden_photo_url: product.hidden_photo_url, + hidden_coordinates: product.hidden_coordinates, + hidden_description: product.hidden_description + }; const jsonExample = JSON.stringify(sampleProduct, null, 2); const message = `To edit product, send a JSON file with product in the following format:\n\n
${jsonExample}
\n\nProduct must have all the fields shown above.\n\nYou can either:\n1. Send the JSON as text\n2. Upload a .json file`;