forked from React-Group/interstellar_ai
Compare commits
3 commits
82b041711c
...
2e67f911c1
Author | SHA1 | Date | |
---|---|---|---|
2e67f911c1 | |||
|
816f61fd6e | ||
|
588d783b47 |
1 changed files with 5 additions and 1 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue