Skip to content

Commit

Permalink
fix: logout if not 200
Browse files Browse the repository at this point in the history
  • Loading branch information
fandujar committed Oct 13, 2024
1 parent dab120c commit 6d0649a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion choregate-ui/src/hooks/Auth.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export const AuthProvider = ({ children }: { children: React.ReactNode }) => {
});

response.then((res) => {
if (res.status === 401) {
if (res.status !== 200) {
localStorage.removeItem('jwt');
navigate('/login');
}}).catch((error) => {
Expand Down

0 comments on commit 6d0649a

Please sign in to comment.