From d51e23080f3cd9de3a5758a21553b11a242c7d4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B4=EA=B4=91=EC=98=A4?= Date: Sun, 30 Jul 2023 17:40:59 +0900 Subject: [PATCH] fix: remove redundant calls to baseURL/url --- frontend/src/api/utils.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frontend/src/api/utils.js b/frontend/src/api/utils.js index 87d6a243..a71a2b0b 100644 --- a/frontend/src/api/utils.js +++ b/frontend/src/api/utils.js @@ -9,6 +9,10 @@ export async function fetchURL(url, opts, auth = true) { let { headers, ...rest } = opts; + if (url.startsWith(baseURL)) { + url = url.substring(baseURL.length); + } + let res; try { res = await fetch(`${baseURL}${url}`, {