attached product sample file
This commit is contained in:
parent
acf9a83558
commit
bc9eae418b
@ -269,7 +269,7 @@ exports.deleteProduct = async (req, res) => {
|
|||||||
|
|
||||||
exports.downloadProductSample = async (req, res) => {
|
exports.downloadProductSample = async (req, res) => {
|
||||||
try {
|
try {
|
||||||
const filePath = path.join(__dirname, "../writable/uploads/sample_files/products_upload_sample.csv");
|
const filePath = path.join(__dirname, "../writable/uploads/products_upload_sample.csv");
|
||||||
return res.download(filePath, "products_upload_sample.csv");
|
return res.download(filePath, "products_upload_sample.csv");
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
return res.status(500).send({ status: "failed", message: error.message });
|
return res.status(500).send({ status: "failed", message: error.message });
|
||||||
|
|||||||
@ -1182,6 +1182,9 @@ router.post("/products/uploadCSV",[ verifySignature, verifyToken, upload.single(
|
|||||||
* get:
|
* get:
|
||||||
* summary: Download sample CSV template for bulk product upload
|
* summary: Download sample CSV template for bulk product upload
|
||||||
* tags: [Products]
|
* tags: [Products]
|
||||||
|
* security:
|
||||||
|
* - appSignature: []
|
||||||
|
* - bearerAuth: []
|
||||||
* responses:
|
* responses:
|
||||||
* 200:
|
* 200:
|
||||||
* description: Sample CSV file downloaded successfully
|
* description: Sample CSV file downloaded successfully
|
||||||
@ -1195,7 +1198,7 @@ router.post("/products/uploadCSV",[ verifySignature, verifyToken, upload.single(
|
|||||||
* 500:
|
* 500:
|
||||||
* description: Server error
|
* description: Server error
|
||||||
*/
|
*/
|
||||||
router.get("/download-sample-product-upload-file",[verifySignature, verifyToken], productController.downloadProductSample);
|
router.get("/products/download-sample",[verifySignature, verifyToken], productController.downloadProductSample);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user