Remove virustotal.js as a dependency
This commit is contained in:
parent
9202b59a5b
commit
fece70f66e
6 changed files with 31 additions and 32 deletions
|
@ -177,11 +177,13 @@ export function* post(next) {
|
|||
// Check in the background
|
||||
process.nextTick(function* malwareScan() {
|
||||
debug('Malware Scan');
|
||||
const { positive, result } = yield malware(dbFile);
|
||||
if (positive) {
|
||||
this.statsd.incr('file.malware', 1);
|
||||
const result = yield malware(dbFile);
|
||||
if (result) {
|
||||
yield Files.updateOne({_id: fileId}, {'$set': {malware: positive, virustotal: result}});
|
||||
if (result.positive) {
|
||||
this.statsd.incr('file.malware', 1);
|
||||
}
|
||||
}
|
||||
yield Files.updateOne({_id: fileId}, {'$set': {malware: positive, virustotal: result}});
|
||||
});
|
||||
} else {
|
||||
debug('Skipping Malware Scan, VIRUSTOTAL env variable not found.');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue