From 8dc13014459c9d94d42ecd33d78649ea4d1aa1b4 Mon Sep 17 00:00:00 2001 From: charlene tau express Date: Mon, 3 Mar 2025 17:58:43 +0800 Subject: [PATCH] change url in api.ts so now CORS is causing issue --- src/utils/api.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/utils/api.ts b/src/utils/api.ts index 4f418aa..d76c4d5 100644 --- a/src/utils/api.ts +++ b/src/utils/api.ts @@ -19,7 +19,8 @@ export const fetchData = async(endpoints="", requestType="GET", requestBody:Reco console.log("callign endpoints: ", endpoints) - const response = await fetch(`${endpoints}`, options) + // const response = await fetch(`${endpoints}`, options) + const response = await fetch("https://192.168.99.121/search", options) if (!response.ok){ throw new Error(`HTTP error! Status: ${response.status}`)