Skip to content

Commit

Permalink
Merge pull request #296 from Rushikesh-Sonawane99/release-1.0.0
Browse files Browse the repository at this point in the history
Issue #PS-000 chore: Fixed login issue due to undefined token
  • Loading branch information
itsvick authored Nov 7, 2024
2 parents 3a48bb2 + 2ee6481 commit 1cea5ea
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 1cea5ea

Please sign in to comment.