diff --git a/data/index.js b/data/index.js index c40c32b..efd15d2 100644 --- a/data/index.js +++ b/data/index.js @@ -126,28 +126,9 @@ module.exports = function(config) { Promise.all(promesas) .then(function() { - - Promise.all([ - knex('PMAEFACT_TEMP').where({ - TIP: req.body.cabecera.TIP, - TCO: req.body.cabecera.TCO, - SUC: req.body.cabecera.SUC, - NCO: req.body.cabecera.NCO, - COD: req.body.cabecera.COD - }) - .del(), - knex('PMOVFACT_TEMP').where({ - TIP: req.body.cabecera.TIP, - TCO: req.body.cabecera.TCO, - SUC: req.body.cabecera.SUC, - NCO: req.body.cabecera.NCO - }) - .del() - ]).then(function() { - - console.log('comprobantes guardados con éxito'); - resolve(); - }) + + console.log('comprobantes guardados con éxito'); + resolve(); }) .catch(function(e) { diff --git a/index.js b/index.js index 62a0c4d..9678d9c 100644 --- a/index.js +++ b/index.js @@ -23,7 +23,7 @@ client.on('open', function open() { }); break; - case 'comprobante' : + case 'comprobante': console.log('recibiendo comprobante') data.guardarComprobante(message.req).then(() => { console.log('se guardó');