update for id bug 30
This commit is contained in:
@ -140,11 +140,14 @@ app.post('/csv', (req, res, next) => {
|
||||
console.log("--- user data ----", _userData[0].mailadress);
|
||||
//check for record alredy exist
|
||||
try {
|
||||
var _cnt = 0;
|
||||
const path = '/var/www/html/appexe/natnats/23/bin/mobileweb2/resources/database/user_record.csv';
|
||||
if (fs.existsSync(path)) {
|
||||
fs.createReadStream(path)
|
||||
.pipe(parse({ delimiter: ",", from_line: 2 }))
|
||||
.pipe(parse({ delimiter: ",", from_line: 1 }))
|
||||
.on("data", function (row) {
|
||||
cnt += 1;
|
||||
if(cnt == 1) return;
|
||||
console.log("--- r-0 ----", row[0]);
|
||||
if(row[0] === _userEmail){
|
||||
_res = row[2];
|
||||
|
||||
Reference in New Issue
Block a user