Added fetchGroup action
• Added: - fetchGroup action
This commit is contained in:
parent
d6b8948191
commit
96f8bb8a32
@ -1,3 +1,7 @@
|
|||||||
|
import {
|
||||||
|
Map as ImmutableMap,
|
||||||
|
List as ImmutableList,
|
||||||
|
} from 'immutable'
|
||||||
import api, { getLinks } from '../api';
|
import api, { getLinks } from '../api';
|
||||||
import { me } from '../initial_state';
|
import { me } from '../initial_state';
|
||||||
import { importFetchedAccounts } from './importer';
|
import { importFetchedAccounts } from './importer';
|
||||||
@ -55,9 +59,13 @@ export const GROUP_UPDATE_ROLE_REQUEST = 'GROUP_UPDATE_ROLE_REQUEST';
|
|||||||
export const GROUP_UPDATE_ROLE_SUCCESS = 'GROUP_UPDATE_ROLE_SUCCESS';
|
export const GROUP_UPDATE_ROLE_SUCCESS = 'GROUP_UPDATE_ROLE_SUCCESS';
|
||||||
export const GROUP_UPDATE_ROLE_FAIL = 'GROUP_UPDATE_ROLE_FAIL';
|
export const GROUP_UPDATE_ROLE_FAIL = 'GROUP_UPDATE_ROLE_FAIL';
|
||||||
|
|
||||||
export const fetchGroup = id => (dispatch, getState) => {
|
export const GROUP_SORT = 'GROUP_SORT'
|
||||||
if (!me) return;
|
|
||||||
|
|
||||||
|
export const importGroup = (group) => (dispatch) => {
|
||||||
|
dispatch(fetchGroupSuccess(group))
|
||||||
|
}
|
||||||
|
|
||||||
|
export const fetchGroup = id => (dispatch, getState) => {
|
||||||
dispatch(fetchGroupRelationships([id]));
|
dispatch(fetchGroupRelationships([id]));
|
||||||
|
|
||||||
if (getState().getIn(['groups', id])) {
|
if (getState().getIn(['groups', id])) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user