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 = {
1818 async store ( req , res ) {
1919 const repo = { repositoryName : req . body . repoName } ;
2020
21- const scannedRepo = scan ( repo ) ;
2221 let result = { } ;
2322 try {
23+ const scannedRepo = scan . getResults ( repo ) ;
2424 result = await Result . create ( scannedRepo ) ;
2525 } catch ( e ) {
2626 logger . error ( e ) ;
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ const sample_finding = {
2626 } ,
2727} ;
2828
29- const scan = repo => ( { ...repo , ...populateResultEntity ( ) } ) ;
29+ const getResults = repo => ( { ...repo , ...populateResultEntity ( ) } ) ;
3030
3131const populateResultEntity = ( ) => attributeDataFromStatus ( chooseRandomStatus ( ) ) ;
3232
@@ -64,4 +64,4 @@ const attributeFindings = (max = 5) => {
6464 return findings ;
6565} ;
6666
67- module . exports = scan ;
67+ module . exports = Object . assign ( { } , { getResults } ) ;
You can’t perform that action at this time.
0 commit comments