main #42

Merged
sageTheDm merged 4 commits from React-Group/interstellar_ai:main into main 2024-10-07 12:02:05 +02:00
Showing only changes of commit 2e67f911c1 - Show all commits

View file

@ -19,7 +19,11 @@ to check if the request was accepted or declined, check response.data.response,
*/
const apiURL = new URL("http://localhost:5000/interstellar_ai/db")
apiURL.hostname = window.location.hostname;
if (typeof window !== 'undefined') {
apiURL.hostname = window.location.hostname;
} else {
apiURL.hostname = "localhost"
}
export const sendToDatabase = async (data: object): Promise<boolean> => {
try {