change url in api.ts so now CORS is causing issue

This commit is contained in:
charlene tau express 2025-03-03 17:58:43 +08:00
parent 764829504b
commit 8dc1301445

View File

@ -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}`)