Commit ac5bd610792b81b38a243f426395031e3b1240c3

Authored by Eric Fernandez
1 parent 585189f639
Exists in master

console catch comprobantes2

rutas/comprobantes.js
... ... @@ -67,6 +67,10 @@ router.post('/comprobante', function(req, res) {
67 67 .then(() => {
68 68 res.status(200).send('Comprobante guardado con éxito');
69 69 })
70   - .catch(err => res.status(500).send(err));
  70 + .catch(err => {
  71 + console.log(err);
  72 + console.log('error al guardar algo ruta comprobantes');
  73 + res.status(500).send(err)
  74 + });
71 75  
72 76 });
webSocketServer/index.js
... ... @@ -93,7 +93,7 @@ module.exports = function() {
93 93  
94 94 var enviar = {
95 95 action: 'comprobante',
96   - req: cuerpo
  96 + req: cuerpo.body
97 97 };
98 98  
99 99 console.log(`enviando comprobante a cliente`)