Download sample file - company profile
This commit is contained in:
parent
ad0490ef53
commit
c13971792e
@ -1415,6 +1415,16 @@ exports.establishmentBulkUpload = async (req, res) => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
exports.downloadCompanyProfileSample = async (req, res) => {
|
||||||
|
try {
|
||||||
|
const filePath = path.join(__dirname, "../uploads/company_profile_upload_sample.csv");
|
||||||
|
return res.download(filePath, "company_profile_upload_sample.csv");
|
||||||
|
} catch (error) {
|
||||||
|
return res.status(500).send({ status: "failed", message: error.message });
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// exports.establishmentBulkUpload = async (req, res) => {
|
// exports.establishmentBulkUpload = async (req, res) => {
|
||||||
// try {
|
// try {
|
||||||
|
|||||||
@ -2794,6 +2794,31 @@ router.get("/emirates", [verifySignature, verifyToken], establishmentController.
|
|||||||
*/
|
*/
|
||||||
router.get("/city-towns", [verifySignature, verifyToken], establishmentController.getAllCityTowns);
|
router.get("/city-towns", [verifySignature, verifyToken], establishmentController.getAllCityTowns);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @swagger
|
||||||
|
* /api/establishment/download-sample-file:
|
||||||
|
* get:
|
||||||
|
* summary: Download sample CSV template for bulk product upload
|
||||||
|
* tags: [Products]
|
||||||
|
* security:
|
||||||
|
* - appSignature: []
|
||||||
|
* - bearerAuth: []
|
||||||
|
* responses:
|
||||||
|
* 200:
|
||||||
|
* description: Sample CSV file downloaded successfully
|
||||||
|
* content:
|
||||||
|
* text/csv:
|
||||||
|
* schema:
|
||||||
|
* type: string
|
||||||
|
* format: binary
|
||||||
|
* 404:
|
||||||
|
* description: File not found
|
||||||
|
* 500:
|
||||||
|
* description: Server error
|
||||||
|
*/
|
||||||
|
router.get("/establishment/download-sample-file",[verifySignature, verifyToken], establishmentController.downloadCompanyProfileSample);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
1
app/uploads/company_profile_upload_sample.csv
Normal file
1
app/uploads/company_profile_upload_sample.csv
Normal file
@ -0,0 +1 @@
|
|||||||
|
Establishment Code,Factory Name,User Name,Email,Emirate,HS Code 1,HS Code 2,HS Code 3,HS Code 4,HS Code 5,Permanent Factory Code,Industry Code Business Register,Industry Code Current Production,Description,Industry Code Mismatch Remarks,Establishment Address,City/Town,Postal Code,PO Box,Makani Number,Contact Person Name,Contact Person Designation,Mobile Number,Website,Number of Emirati Male,Number of Emirati Female,Number of Non-Emirati Male,Number of Non-Emirati Female
|
||||||
|
Loading…
Reference in New Issue
Block a user