Skip to content

Commit

Permalink
Merge pull request #146 from n0a/patch-3
Browse files Browse the repository at this point in the history
Sort openPorts and failedPorts before returning
  • Loading branch information
Lissy93 authored May 28, 2024
2 parents fd49c48 + b55a1cc commit 5b71ba9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion api/ports.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,11 @@ const handler = async (url, event, context) => {
if(timeoutReached){
return errorResponse('The function timed out before completing.');
}


// Sort openPorts and failedPorts before returning
openPorts.sort((a, b) => a - b);
failedPorts.sort((a, b) => a - b);

return { openPorts, failedPorts };
};

Expand Down

0 comments on commit 5b71ba9

Please sign in to comment.