Skip to content

Commit

Permalink
Sort openPorts and failedPorts before returning
Browse files Browse the repository at this point in the history
  • Loading branch information
n0a authored May 27, 2024
1 parent fd49c48 commit b55a1cc
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 b55a1cc

Please sign in to comment.