update for id bug 7

This commit is contained in:
Mohamed Nouffer
2022-11-16 11:55:37 +05:30
parent 83a473039b
commit 5f8727a4f0

View File

@ -158,6 +158,7 @@ app.post('/csv', (req, res, next) => {
}); });
_res = 'OK'; _res = 'OK';
} }
res.send({'id': _res});
}); });
} }
@ -165,12 +166,13 @@ app.post('/csv', (req, res, next) => {
console.log("---error -----"); console.log("---error -----");
writetoFile(csv); writetoFile(csv);
console.error(err) console.error(err)
res.send({'erro': err});
} }
// print CSV string // print CSV string
//console.log(csv); //console.log(csv);
}); });
console.log("---sending res -----"); console.log("---sending res -----");
res.send({'id': _res}); //res.send({'id': _res});
}); });
function writetoFile(csv) { function writetoFile(csv) {