result_list
This commit is contained in:
@@ -75,7 +75,7 @@ app.post('/upload/task', upload.single('file'), (req, res) => {
|
||||
|
||||
const oldPath = req.file.path;
|
||||
const newPath = dir + "/" + req.file.filename;
|
||||
|
||||
var result_list ='';
|
||||
fs.rename(oldPath, newPath, function (err) {
|
||||
if (err) throw err
|
||||
console.log('Successfully renamed - AKA moved!');
|
||||
@@ -100,11 +100,12 @@ app.post('/upload/task', upload.single('file'), (req, res) => {
|
||||
console.log("DataError - > ", dbErr.toString());
|
||||
}else{
|
||||
console.log("DB Result - > " , result.rows);
|
||||
result_list = result.rows;
|
||||
}
|
||||
console.log('End::Database Registration!');
|
||||
})
|
||||
|
||||
return res.status(200).send('Completed')
|
||||
return res.status(200).json({'status': 'Completed', 'internal_return': 0, 'result_list': result_list })
|
||||
//return res.status(200).send('Completed')
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user