Parallelize requests in Org::get

Signed-off-by: Alexis Sellier <self@cloudhead.io>
This commit is contained in:
Alexis Sellier
2021-09-22 15:40:03 +02:00
parent b343cbba12
commit cca312723f
+4 -2
View File
@@ -209,8 +209,10 @@ export class Org {
);
try {
const owner = await org.owner();
const resolved = await org.resolvedAddress;
const [owner, resolved] = await Promise.all([
org.owner(),
org.resolvedAddress,
]);
// If what is resolved is not the same as the input, it's because we
// were given a name.