File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -18,9 +18,9 @@ module.exports = {
18
18
async store ( req , res ) {
19
19
const repo = { repositoryName : req . body . repoName } ;
20
20
21
- const scannedRepo = scan ( repo ) ;
22
21
let result = { } ;
23
22
try {
23
+ const scannedRepo = scan . getResults ( repo ) ;
24
24
result = await Result . create ( scannedRepo ) ;
25
25
} catch ( e ) {
26
26
logger . error ( e ) ;
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ const sample_finding = {
26
26
} ,
27
27
} ;
28
28
29
- const scan = repo => ( { ...repo , ...populateResultEntity ( ) } ) ;
29
+ const getResults = repo => ( { ...repo , ...populateResultEntity ( ) } ) ;
30
30
31
31
const populateResultEntity = ( ) => attributeDataFromStatus ( chooseRandomStatus ( ) ) ;
32
32
@@ -64,4 +64,4 @@ const attributeFindings = (max = 5) => {
64
64
return findings ;
65
65
} ;
66
66
67
- module . exports = scan ;
67
+ module . exports = Object . assign ( { } , { getResults } ) ;
You can’t perform that action at this time.
0 commit comments