Add awaits

This commit is contained in:
Andrew Pennington 2024-08-15 23:40:42 +01:00
parent f11180db7a
commit 631a5e3e31
No known key found for this signature in database
GPG key ID: E9DA097213FD17EA
8 changed files with 14 additions and 13 deletions

View file

@ -89,7 +89,7 @@ const SettingsDialog = ({
if (isOpen) {
const fetchConfig = async () => {
setIsLoading(true);
const res = await fetch(`${getServerEnv("BACKEND_API_URL")}/config`, {
const res = await fetch(`${await getServerEnv("BACKEND_API_URL")}/config`, {
headers: {
'Content-Type': 'application/json',
},
@ -149,7 +149,7 @@ const SettingsDialog = ({
setIsUpdating(true);
try {
await fetch(`${getServerEnv("BACKEND_API_URL")}/config`, {
await fetch(`${await getServerEnv("BACKEND_API_URL")}/config`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',