Commit ccff2219 authored by Jun Siang Cheah's avatar Jun Siang Cheah
Browse files

refac: run admin general settings fetches in parallel

parent 12357149
...@@ -36,10 +36,20 @@ ...@@ -36,10 +36,20 @@
}; };
onMount(async () => { onMount(async () => {
signUpEnabled = await getSignUpEnabledStatus(localStorage.token); await Promise.all([
defaultUserRole = await getDefaultUserRole(localStorage.token); (async () => {
JWTExpiresIn = await getJWTExpiresDuration(localStorage.token); signUpEnabled = await getSignUpEnabledStatus(localStorage.token);
webhookUrl = await getWebhookUrl(localStorage.token); })(),
(async () => {
defaultUserRole = await getDefaultUserRole(localStorage.token);
})(),
(async () => {
JWTExpiresIn = await getJWTExpiresDuration(localStorage.token);
})(),
(async () => {
webhookUrl = await getWebhookUrl(localStorage.token);
})()
]);
}); });
</script> </script>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment