Rename deadline to due date, update dependencies
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import {
|
||||
all, call, fork, take,
|
||||
all, apply, call, fork, take,
|
||||
} from 'redux-saga/effects';
|
||||
|
||||
import watchers from './watchers';
|
||||
@@ -12,11 +12,11 @@ import Paths from '../../constants/Paths';
|
||||
export default function* () {
|
||||
yield all(watchers.map((watcher) => fork(watcher)));
|
||||
|
||||
yield call([socket, socket.connect]);
|
||||
yield call(initializeAppService);
|
||||
yield apply(socket, socket.connect);
|
||||
yield fork(initializeAppService);
|
||||
|
||||
yield take(ActionTypes.LOGOUT);
|
||||
yield call(removeAccessToken);
|
||||
|
||||
yield call(removeAccessToken);
|
||||
window.location.href = Paths.LOGIN;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import { call, select, put } from 'redux-saga/effects';
|
||||
import {
|
||||
call, put, select, take,
|
||||
} from 'redux-saga/effects';
|
||||
|
||||
import { accessTokenSelector } from '../../../selectors';
|
||||
import { logout } from '../../../actions';
|
||||
@@ -14,6 +16,7 @@ export default function* (method, ...args) {
|
||||
} catch (error) {
|
||||
if (error.code === ErrorCodes.UNAUTHORIZED) {
|
||||
yield put(logout()); // TODO: next url
|
||||
yield take();
|
||||
}
|
||||
|
||||
throw error;
|
||||
|
||||
@@ -14,13 +14,7 @@ import i18n from '../../../i18n';
|
||||
import Paths from '../../../constants/Paths';
|
||||
|
||||
export function* loadLocaleService(language) {
|
||||
try {
|
||||
yield call(i18n.loadAppLocale, language);
|
||||
|
||||
return true;
|
||||
} catch (error) {
|
||||
return false;
|
||||
}
|
||||
yield call(i18n.loadAppLocale, language);
|
||||
}
|
||||
|
||||
export function* initializeAppService() {
|
||||
|
||||
@@ -5,7 +5,6 @@ import { authenticate, clearAuthenticationError } from '../../../actions';
|
||||
|
||||
export function* authenticateService(data) {
|
||||
yield put(authenticate(data));
|
||||
|
||||
yield call(authenticateRequest, data);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user