case AUTH_AUTHORIZATION_USER:
state.users.forEach(user => {
if(user.login === action.payload[0] && user.password === action.payload[1]) {
// console.log(state)
return {
...state,
isLogged: true
}
} else new Error("Ошибка")
})
case AUTH_AUTHORIZATION_USER:
for(let i = 0; i < state.users.length; i++){
if(state.users[i].login === action.payload[0] && state.users[i].password === action.payload[1]){
return {
...state,
isLogged: true
}
} else new Error("Ошибка")
}