Proyectos de Subversion LeadersLinked - SPA

Rev

Rev 2219 | Rev 2237 | Ir a la última revisión | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
2219 stevensc 1
import { actionsTypes } from './auth.types'
5 stevensc 2
 
96 stevensc 3
export const setPermissions = (permissions) => ({
5 stevensc 4
  type: actionsTypes.SET_PERMISSIONS,
2219 stevensc 5
  payload: permissions
6
})
5 stevensc 7
 
8
export const startLoading = () => ({
2219 stevensc 9
  type: actionsTypes.START_LOADING
10
})
5 stevensc 11
 
12
export const stopLoading = () => ({
2219 stevensc 13
  type: actionsTypes.STOP_LOADING
14
})
5 stevensc 15
 
2219 stevensc 16
export const logout = () => {
17
  return (dispatch) => {
18
    dispatch(removeAuth())
19
  }
20
}
21
 
66 stevensc 22
export const login = () => ({
2219 stevensc 23
  type: actionsTypes.LOGIN
24
})
5 stevensc 25
 
2219 stevensc 26
export const removeAuth = () => ({
27
  type: actionsTypes.LOGOUT
28
})