Project managers, board members, auto-update after reconnection, refactoring
This commit is contained in:
@@ -1,11 +1,20 @@
|
||||
import { call, put } from 'redux-saga/effects';
|
||||
|
||||
import { authenticateRequest } from '../requests';
|
||||
import { authenticate, clearAuthenticateError } from '../../../actions';
|
||||
import api from '../../../api';
|
||||
|
||||
export function* authenticateService(data) {
|
||||
yield put(authenticate(data));
|
||||
yield call(authenticateRequest, data);
|
||||
|
||||
let accessToken;
|
||||
try {
|
||||
({ item: accessToken } = yield call(api.createAccessToken, data));
|
||||
} catch (error) {
|
||||
yield put(authenticate.failure(error));
|
||||
return;
|
||||
}
|
||||
|
||||
yield put(authenticate.success(accessToken));
|
||||
}
|
||||
|
||||
export function* clearAuthenticateErrorService() {
|
||||
|
||||
Reference in New Issue
Block a user