client/src/actions/authActions.js
author ymh <ymh.work@gmail.com>
Tue, 27 Jun 2017 11:38:26 +0200
changeset 97 69eaef18b01b
parent 89 06f609adfbf8
child 100 6fd752d98933
permissions -rw-r--r--
Improve the network saga. Try to avoid unnecessary token refresh

import * as types from '../constants/actionTypes';

export const loginSubmit = (username, password) => {
  return {
    type: types.AUTH_LOGIN_SUBMIT,
    username,
    password
  };
}

export const logout = () => {
  return {
    type: types.AUTH_LOGOUT
  };
}

export const registerSubmit = (username, email, password1, password2) => {
  return {
    type: types.AUTH_REGISTER_SUBMIT,
    username,
    email,
    password1,
    password2
  };
}