sorting out this login issue
This commit is contained in:
parent
d802da6f8b
commit
5b0c07b09c
1 changed files with 3 additions and 3 deletions
|
@ -23,12 +23,12 @@ export const userLogin = (username, password) => async (dispatch) => {
|
|||
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 })
|
||||
}
|
||||
};
|
||||
|
|
Reference in a new issue