|
|
@ -22,7 +22,7 @@ async function getTasks(req, res) { |
|
|
|
fs.readdir(EXPORTED_PATH, (err, items) => { |
|
|
|
fs.readdir(EXPORTED_PATH, (err, items) => { |
|
|
|
if(err) { |
|
|
|
if(err) { |
|
|
|
console.error(err); |
|
|
|
console.error(err); |
|
|
|
res.status(500).send('Something went wrong'); |
|
|
|
res.status(500).send(err.message); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
for(let item of items) { |
|
|
|
for(let item of items) { |
|
|
|
let file = path.parse(item); |
|
|
|
let file = path.parse(item); |
|
|
|