Skip to content

Commit

Permalink
Merge pull request #1337 from akto-api-security/hotfix/update_total_c…
Browse files Browse the repository at this point in the history
…ount

Revert "overwrite total APIs count if All APIs group is present"
  • Loading branch information
notshivansh authored Aug 7, 2024
2 parents 343f28e + 475bb0e commit 347b395
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,19 +116,12 @@ const transform = {
getCountInfo: (collectionsArr, coverageObject) => {
let urlsCount = 0 ;
let coverageCount = 0 ;
let allAPIsGroupActive = false;
collectionsArr.forEach((x) =>{
if (x.hasOwnProperty('type') && x.type === 'API_GROUP') {
if (x.id === 111111121) {
urlsCount = x.urlsCount;
allAPIsGroupActive = true;
}
return
}

if(!allAPIsGroupActive){
urlsCount += x.urlsCount;
}
urlsCount += x.urlsCount;
coverageCount += coverageObject[x.id] || 0 ;
})
return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -453,19 +453,12 @@ const transform = {
let sensitiveInRes = 0;
let totalTested = 0 ;

let allAPIsGroupActive = false;
collectionsData?.forEach((c) =>{
if (c.hasOwnProperty('type') && c.type === 'API_GROUP') {
if(c.id===111111121){
totalUrl = c.urlsCount;
allAPIsGroupActive = true;
}
return
}

if(!allAPIsGroupActive){
totalUrl += c.urlsCount ;
}
totalTested += c.testedEndpoints;
})

Expand Down

0 comments on commit 347b395

Please sign in to comment.