const signIn = function* signIn() {
while (true) {
const request = yield take(LOGIN_REQUEST);
try {
response = yield call(AuthService.signIn, { login: request.data.login, password: request.data.password });
} catch (error) {
return alert(error);
}
yield put({ type: SET_AUTH, username: request.data.login });
yield put({ type: RESET_TO_MAIN });
}
}