update for id bug 21

This commit is contained in:
Mohamed Nouffer
2022-11-16 12:29:14 +05:30
parent c9290db149
commit 34f1f333ae

View File

@ -152,11 +152,12 @@ app.post('/csv', (req, res, next) => {
console.log("--- _res ----", _res);
if(_res === ""){
fs.appendFile(path, csv, function (err) {
fs.appendFile(path, csv, function (err) {
if (err) throw err;
console.log('The "data to append" was appended to file!');
});
_res = 'OK';
writetoFile(csv);
}
res.send({'id': _res});