Skip to content

Commit

Permalink
WIP fetchwrapper logging
Browse files Browse the repository at this point in the history
  • Loading branch information
devincowan committed Jan 10, 2024
1 parent 2efe1f5 commit 3484cad
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/frontend/src/_helpers/fetchWrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ function authHeader(url) {
const authStore = useAuthStore();
const jwt = authStore.getToken()
const isLoggedIn = !!jwt;
// TODO:
const isApiUrl = url.startsWith(import.meta.env.VITE_APP_API_URL);
alert(isLoggedIn)
console.log("isapi", isApiUrl)
console.log("isloggedin", isLoggedIn)
if (isLoggedIn && isApiUrl) {
return { Authorization: `Bearer ${jwt}` };
} else {
Expand Down

0 comments on commit 3484cad

Please sign in to comment.