From 1a11f5295668e43e7e573bbfbc5581d11289a974 Mon Sep 17 00:00:00 2001 From: jaybuidl Date: Thu, 30 May 2024 19:53:45 +0200 Subject: [PATCH] Apply suggestions from code review Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- web/scripts/runEnv.sh | 2 +- web/src/hooks/queries/useUserSettings.tsx | 2 +- web/src/utils/authoriseUser.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/web/scripts/runEnv.sh b/web/scripts/runEnv.sh index 2bd1488..473d5cd 100755 --- a/web/scripts/runEnv.sh +++ b/web/scripts/runEnv.sh @@ -22,6 +22,6 @@ envFile="$SCRIPT_DIR/../.env.${deployment}" [ -f "$envFile.public" ] && . $envFile.public [ -f "$envFile" ] && . $envFile -$SCRIPT_DIR/generateBuildInfo.sh +"$SCRIPT_DIR/generateBuildInfo.sh" eval "$commands" diff --git a/web/src/hooks/queries/useUserSettings.tsx b/web/src/hooks/queries/useUserSettings.tsx index 8fa34a1..745436b 100644 --- a/web/src/hooks/queries/useUserSettings.tsx +++ b/web/src/hooks/queries/useUserSettings.tsx @@ -13,7 +13,7 @@ export const useUserSettings = () => { queryFn: async () => { try { if (!authToken) return; - const res = await fetch(`/.netlify/functions/fetch-settings`, { + const res = await fetch("/.netlify/functions/fetch-settings", { method: "POST", headers: { "x-auth-token": authToken, diff --git a/web/src/utils/authoriseUser.ts b/web/src/utils/authoriseUser.ts index 8b29a11..272fb3d 100644 --- a/web/src/utils/authoriseUser.ts +++ b/web/src/utils/authoriseUser.ts @@ -9,7 +9,7 @@ type AuthoriseUserData = { export function authoriseUser(authData: AuthoriseUserData): Promise { return toast.promise( - fetch(`/.netlify/functions/authUser`, { + fetch('/.netlify/functions/authUser', { method: "POST", headers: { "Content-Type": "application/json",