From 5b0c07b09cd1d919281379b76487e0d8fafc0454 Mon Sep 17 00:00:00 2001 From: Asara Date: Wed, 22 Jan 2020 00:40:15 -0500 Subject: [PATCH] sorting out this login issue --- src/actions/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/actions/index.js b/src/actions/index.js index 108b5cc..41ab73a 100644 --- a/src/actions/index.js +++ b/src/actions/index.js @@ -20,15 +20,15 @@ export const fetchUserProfile = (user) => async (dispatch) => { }; export const userLogin = (username, password) => async (dispatch) => { - const response = await sudoscientist.post('/auth/signin', { + const response = await sudoscientist.post('/auth/signin',{ username: username, password: password - } - ) + }) if (response.status === 401) { dispatch({ type: 'USER_LOGIN', payload: null }) } if (response.status === 200) { + console.log(document.cookie) dispatch({ type: 'USER_LOGIN', payload: response }) } };