Proyectos de Subversion LeadersLinked - SPA

Rev

Rev 64 | Rev 66 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 64 Rev 65
Línea 30... Línea 30...
30
export const validateAuth = () => {
30
export const validateAuth = () => {
31
  return (dispatch) => {
31
  return (dispatch) => {
32
    const token = window.localStorage.getItem("jwt");
32
    const token = window.localStorage.getItem("jwt");
Línea 33... Línea 33...
33
 
33
 
34
    if (token) {
34
    if (token) {
-
 
35
      dispatch(login());
35
      return dispatch(login());
36
      return null;
Línea 36... Línea 37...
36
    }
37
    }
37
 
38
 
38
    dispatch(getPermissions());
39
    dispatch(getPermissions());
Línea 50... Línea 51...
50
 
51
 
51
export const stopLoading = () => ({
52
export const stopLoading = () => ({
52
  type: actionsTypes.STOP_LOADING,
53
  type: actionsTypes.STOP_LOADING,
Línea 53... Línea 54...
53
});
54
});
-
 
55
 
-
 
56
export const login = () => {
54
 
57
  console.log("Processing login");
-
 
58
  return {
55
export const login = () => ({
59
    type: actionsTypes.LOGIN,
Línea 56... Línea 60...
56
  type: actionsTypes.LOGIN,
60
  };
57
});
61
};
58
 
62