Export production orders with missing data
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m2s
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m2s
This commit is contained in:
@@ -9,7 +9,7 @@ const {
|
||||
requestOlistSyncStop,
|
||||
startOlistSync
|
||||
} = require('../services/olistService');
|
||||
const { importFinalizedProductionOrderCsv, listProductionOrderImportData } = require('../services/productionOrderCsvImportService');
|
||||
const { exportMissingProductionOrderDataCsv, importFinalizedProductionOrderCsv, listProductionOrderImportData } = require('../services/productionOrderCsvImportService');
|
||||
|
||||
const router = express.Router();
|
||||
|
||||
@@ -57,6 +57,14 @@ router.get('/olist/production-order-imports', verifySuperAdmin, async (req, res,
|
||||
}
|
||||
});
|
||||
|
||||
router.get('/olist/production-order-imports/pending-csv', verifySuperAdmin, async (req, res, next) => {
|
||||
try {
|
||||
res.json(await exportMissingProductionOrderDataCsv());
|
||||
} catch (error) {
|
||||
next(error);
|
||||
}
|
||||
});
|
||||
|
||||
router.post('/olist/production-order-imports', verifySuperAdmin, async (req, res, next) => {
|
||||
try {
|
||||
res.status(201).json(await importFinalizedProductionOrderCsv(req.body || {}));
|
||||
|
||||
Reference in New Issue
Block a user