Fix linting

This commit is contained in:
Jonathan Cremin 2018-06-02 18:07:00 +00:00
parent 553ba9db9a
commit bb5189c9ed
35 changed files with 157 additions and 866 deletions

View file

@ -1,4 +1,4 @@
import virustotal from './virustotal';
import getFileReport from './virustotal';
const extensions = [
'EXE',
@ -65,13 +65,13 @@ function getExtension(filename) {
return (i < 0) ? '' : filename.substr(i + 1);
}
export default function* (file) {
if (extensions.indexOf(getExtension(file.file_name.toUpperCase())) < 0) {
export default async (file) => {
if (extensions.indexOf(getExtension(file.name.toUpperCase())) < 0) {
return false;
}
const result = yield virustotal.getFileReport(file.md5);
const result = await getFileReport(file.md5);
return {
positive: result.positives >= 5,
result,
};
}
};