Skip to content

Commit

Permalink
addded filename to scan result
Browse files Browse the repository at this point in the history
  • Loading branch information
hannah-macdonald1 committed Dec 6, 2023
1 parent 99dc72f commit 65b9327
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,12 @@ app.post('/virus-scan', async (req, res) => {

if (scanResult.is_infected === true || scanFile.is_infected === null) {
return res.status(502).json({
filename: scanResult.filename ? scanResult.filename : null,
clean: false
})
}
return res.status(200).json({
filename: scanResult.filename ? scanResult.filename : null,
clean: true
});
});
Expand Down

0 comments on commit 65b9327

Please sign in to comment.