Merge pull request #146 from n0a/patch-3

Sort openPorts and failedPorts before returning
This commit is contained in:
Alicia Sykes 2024-05-28 17:35:31 +01:00 committed by GitHub
commit 5b71ba96c5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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 };
};