Proyectos de Subversion LeadersLinked - SPA

Rev

Rev 3035 | Rev 3262 | Ir a la última revisión | Autoría | Comparar con el anterior | Ultima modificación | Ver Log |

import { actionsTypes } from './auth.types'

export const setPermissions = (permissions) => ({
  type: actionsTypes.SET_PERMISSIONS,
  payload: permissions
})

export const startLoading = () => ({
  type: actionsTypes.START_LOADING
})

export const stopLoading = () => ({
  type: actionsTypes.STOP_LOADING
})

export const logout = () => {
  return (dispatch) => {
    window.localStorage.removeItem('jwt')
    window.localStorage.removeItem('aes')
    dispatch(removeAuth())
  }
}

export const login = () => ({
  type: actionsTypes.LOGIN
})

export const removeAuth = () => ({
  type: actionsTypes.LOGOUT
})