Skip to content

Commit

Permalink
Fix: If unauthenticaed, the redirect to login page did not work
Browse files Browse the repository at this point in the history
  • Loading branch information
tbnobody committed Apr 12, 2024
1 parent de156ef commit 011f00e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions webapp/src/utils/authentication.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ export function handleResponse(response: Response, emitter: Emitter<Record<Event
logout();
emitter.emit("logged-out");
router.push({ path: "/login", query: { returnUrl: router.currentRoute.value.fullPath } });
return Promise.reject();
}

const error = { message: (data && data.message) || response.statusText, status: response.status || 0 };
Expand Down

0 comments on commit 011f00e

Please sign in to comment.