Skip to content
Snippets Groups Projects
Commit aa833bb6 authored by mateusz-winiarczyk's avatar mateusz-winiarczyk
Browse files

fix(overlay): fix persisting session

parent 5c4db776
No related branches found
No related tags found
2 merge requests!87feat(overlays): MIN-192 add overlay as user,!79feat(overlays): MIN-191 add possibility to login
...@@ -10,7 +10,10 @@ export const login = createAsyncThunk( ...@@ -10,7 +10,10 @@ export const login = createAsyncThunk(
'user/login', 'user/login',
async (credentials: { login: string; password: string }, { dispatch }) => { async (credentials: { login: string; password: string }, { dispatch }) => {
const searchParams = new URLSearchParams(credentials); const searchParams = new URLSearchParams(credentials);
const response = await axiosInstance.post(apiPath.postLogin(), searchParams); const response = await axiosInstance.post(apiPath.postLogin(), searchParams, {
withCredentials: true,
});
const isDataValid = validateDataUsingZodSchema(response.data, loginSchema); const isDataValid = validateDataUsingZodSchema(response.data, loginSchema);
dispatch(closeModal()); dispatch(closeModal());
......
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