Skip to content

Commit

Permalink
silly mistake
Browse files Browse the repository at this point in the history
  • Loading branch information
harryob committed Apr 28, 2024
1 parent 1aada0a commit 9012e6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/helpers/api.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export const callApi = async (toCall: string, init?: RequestInit | undefined): Promise<Response> => {
const response = await fetch(`${import.meta.env.VITE_API_PATH}${toCall}`, init)
if (response.status == 400) {
location.replace(`${location.protocol}//${location.host}/?forceReload=true`)
location.replace(`${location.protocol}//${location.host}/?forceRefresh=true`)
}
return response
}

0 comments on commit 9012e6e

Please sign in to comment.