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/login.js

33 lines
562 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 authenticate = (data) => ({
2019-08-31 04:07:25 +05:00
type: ActionTypes.AUTHENTICATE,
payload: {
data,
},
});
authenticate.success = (accessToken) => ({
type: ActionTypes.AUTHENTICATE__SUCCESS,
2019-08-31 04:07:25 +05:00
payload: {
accessToken,
},
});
authenticate.failure = (error) => ({
type: ActionTypes.AUTHENTICATE__FAILURE,
2019-08-31 04:07:25 +05:00
payload: {
error,
},
});
2022-08-04 13:31:14 +02:00
const clearAuthenticateError = () => ({
type: ActionTypes.AUTHENTICATE_ERROR_CLEAR,
payload: {},
});
2022-08-04 13:31:14 +02:00
export default {
authenticate,
clearAuthenticateError,
};