Sort openPorts and failedPorts before returning

This commit is contained in:
Denis Simonov authored and GitHub committed 2024-05-28 02:59:30 +03:00
1 parent fd49c488b1
commit b55a1cc1b3
1 file changed
+4
+4
View File
@@ -73,6 +73,10 @@ const handler = async (url, event, context) => {
return errorResponse('The function timed out before completing.'); 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 }; return { openPorts, failedPorts };
}; };