Skip to content
Snippets Groups Projects
Verified Commit 1c31cd69 authored by Defendi Alberto's avatar Defendi Alberto
Browse files

Remove inappropriate negation in api response causing no login

parent ddd66cf9
No related branches found
No related tags found
1 merge request!39is_authenticated, hide password and move styles
Pipeline #11881 passed
......@@ -25,12 +25,10 @@ export const PrivateRoute = ({
useEffect(() => {
const fetch = async (): Promise<unknown> => {
const result = await axios('/api/web/login/is_authenticated');
// FIX: Remove negation and use true server data
setAuth(!result.data.is_authenticated);
setAuth(result.data.is_authenticated);
setLoading(true);
return null;
};
fetch();
}, []);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment