2017-07-11 16:35:39 +08:00
|
|
|
import {
|
|
|
|
FETCH_GROUP_LIST,
|
2017-07-17 10:17:29 +08:00
|
|
|
SET_CURR_GROUP
|
2017-07-11 16:35:39 +08:00
|
|
|
} from '../constants/action-types';
|
2017-07-14 15:15:59 +08:00
|
|
|
import axios from 'axios';
|
2017-07-11 16:35:39 +08:00
|
|
|
|
|
|
|
export function fetchGroupList() {
|
|
|
|
return {
|
|
|
|
type: FETCH_GROUP_LIST,
|
2017-07-14 15:15:59 +08:00
|
|
|
payload: axios.get('/group/list')
|
2017-07-11 16:35:39 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-07-17 10:17:29 +08:00
|
|
|
export function setCurrGroup(group) {
|
2017-07-11 16:35:39 +08:00
|
|
|
return {
|
2017-07-17 10:17:29 +08:00
|
|
|
type: SET_CURR_GROUP,
|
|
|
|
payload: group
|
2017-07-11 16:35:39 +08:00
|
|
|
}
|
|
|
|
}
|