fix: make use of promise.all

This commit is contained in:
Arman
2023-08-29 18:37:18 +02:00
parent 8f50e8423e
commit b697b6f914
@@ -57,13 +57,11 @@
);
if ($templateConfig.variables) {
for (const [key, value] of Object.entries($templateConfig.variables)) {
await sdk.forProject.functions.createVariable(
response.$id,
key,
value?.toString()
);
}
const promises = Object.entries($templateConfig.variables).map(([key, value]) =>
sdk.forProject.functions.createVariable(response.$id, key, value?.toString())
);
await Promise.all(promises);
}
goto(