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

Move cookie fetch to separate file.

parent 885e7f84
No related branches found
No related tags found
2 merge requests!56Refined auth flow and new website pages.,!44New route type (RestrictedRoute) and better api calls.
import axios from 'axios';
export const fetchCookie = async (
setIsCookieFetched: React.Dispatch<React.SetStateAction<string>>,
): Promise<unknown> => {
const response = await axios('/api/web/csrf');
setIsCookieFetched(response.data.token);
return null;
};
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