You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
66 lines
1021 B
JavaScript
66 lines
1021 B
JavaScript
import ActionTypes from '../constants/ActionTypes';
|
|
|
|
const initializeCore = (
|
|
user,
|
|
board,
|
|
users,
|
|
projects,
|
|
projectManagers,
|
|
boards,
|
|
boardMemberships,
|
|
labels,
|
|
lists,
|
|
cards,
|
|
cardMemberships,
|
|
cardLabels,
|
|
tasks,
|
|
attachments,
|
|
activities,
|
|
notifications,
|
|
) => ({
|
|
type: ActionTypes.CORE_INITIALIZE,
|
|
payload: {
|
|
user,
|
|
board,
|
|
users,
|
|
projects,
|
|
projectManagers,
|
|
boards,
|
|
boardMemberships,
|
|
labels,
|
|
lists,
|
|
cards,
|
|
cardMemberships,
|
|
cardLabels,
|
|
tasks,
|
|
attachments,
|
|
activities,
|
|
notifications,
|
|
},
|
|
});
|
|
|
|
// TODO: with success?
|
|
initializeCore.fetchConfig = (config) => ({
|
|
type: ActionTypes.CORE_INITIALIZE__CONFIG_FETCH,
|
|
payload: {
|
|
config,
|
|
},
|
|
});
|
|
|
|
const logout = (invalidateAccessToken) => ({
|
|
type: ActionTypes.LOGOUT,
|
|
payload: {
|
|
invalidateAccessToken,
|
|
},
|
|
});
|
|
|
|
logout.invalidateAccessToken = () => ({
|
|
type: ActionTypes.LOGOUT__ACCESS_TOKEN_INVALIDATE,
|
|
payload: {},
|
|
});
|
|
|
|
export default {
|
|
initializeCore,
|
|
logout,
|
|
};
|