1
0
Fork 0
mirror of https://github.com/plankanban/planka.git synced 2025-07-19 05:09:43 +02:00
planka/client/src/actions/core.js

66 lines
1,021 B
JavaScript
Raw Normal View History

2019-08-31 04:07:25 +05:00
import ActionTypes from '../constants/ActionTypes';
2022-08-04 13:31:14 +02:00
const initializeCore = (
user,
board,
users,
projects,
projectManagers,
boards,
boardMemberships,
labels,
lists,
cards,
cardMemberships,
cardLabels,
tasks,
attachments,
2022-08-04 13:31:14 +02:00
activities,
notifications,
) => ({
type: ActionTypes.CORE_INITIALIZE,
payload: {
user,
board,
users,
projects,
projectManagers,
boards,
boardMemberships,
labels,
lists,
cards,
cardMemberships,
cardLabels,
tasks,
attachments,
2022-08-04 13:31:14 +02:00
activities,
notifications,
},
2019-08-31 04:07:25 +05:00
});
2022-08-04 13:31:14 +02:00
// TODO: with success?
initializeCore.fetchConfig = (config) => ({
type: ActionTypes.CORE_INITIALIZE__CONFIG_FETCH,
payload: {
config,
},
});
const logout = (invalidateAccessToken) => ({
2022-08-04 13:31:14 +02:00
type: ActionTypes.LOGOUT,
payload: {
invalidateAccessToken,
},
2022-08-04 13:31:14 +02:00
});
logout.invalidateAccessToken = () => ({
type: ActionTypes.LOGOUT__ACCESS_TOKEN_INVALIDATE,
payload: {},
});
2022-08-04 13:31:14 +02:00
export default {
initializeCore,
logout,
};