Skip to content

Commit

Permalink
Issue #PS-000 chore: Fixed login issue due to undefine token
Browse files Browse the repository at this point in the history
  • Loading branch information
Rushikesh-Sonawane99 committed Nov 7, 2024
1 parent 3a48bb2 commit 2ee6481
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/services/Interceptor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ instance.interceptors.request.use(
(config) => {
if (typeof window !== "undefined" && window.localStorage) {
const token = localStorage.getItem("token");
if (token) {
if (token && config.url && !config.url.endsWith("user/v1/auth/login")) {
config.headers.Authorization = `Bearer ${token}`;
}
const academicYearId = localStorage.getItem('academicYearId')
Expand Down

0 comments on commit 2ee6481

Please sign in to comment.