Skip to content

Commit

Permalink
Update api-handler.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
AkekoChan committed Mar 13, 2024
1 parent f024be8 commit 6409d7b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions client/src/utils/api/api-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import toast from "react-hot-toast";

type HTTPMethod = "GET" | "POST" | "PATCH";

const apiURLFlami = "http://localhost:3001/api";
const apiURLFlami = "https://flami-api.onrender.com/api";
const apiURLMap = "https://maksance.alwaysdata.net/api-jo";

export const APIHandler = <T>(
Expand Down Expand Up @@ -47,8 +47,8 @@ export const APIHandler = <T>(
},
});
});
if(res.status === 401) {

if (res.status === 401) {
localStorage.clear();
window.location.pathname = "/sign-in";
}
Expand Down

0 comments on commit 6409d7b

Please sign in to comment.