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

Specify promise type

parent 324b89fc
No related branches found
No related tags found
1 merge request!33Connect api calls and include test/docs cases
Pipeline #11809 passed
......@@ -23,11 +23,12 @@ export const PrivateRoute = ({
const [loading, setLoading] = useState<boolean>(false);
useEffect(() => {
const fetch = async (): Promise<any> => {
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);
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