diff --git a/app/backend/database.ts b/app/backend/database.ts index cb52199..f4f085c 100644 --- a/app/backend/database.ts +++ b/app/backend/database.ts @@ -19,11 +19,7 @@ to check if the request was accepted or declined, check response.data.response, */ const apiURL = new URL("http://localhost:5000/interstellar_ai/db") -if (typeof window !== 'undefined') { - apiURL.hostname = window.location.hostname; -} else { - apiURL.hostname = "localhost" -} +apiURL.hostname = window.location.hostname; export const sendToDatabase = async (data: object): Promise => { try {