client/src/actions/authActions.js
author ymh <ymh.work@gmail.com>
Mon, 08 Oct 2018 18:35:47 +0200
changeset 168 ea92f4fe783d
parent 129 d48946d164c6
child 199 c78d579f4b55
permissions -rw-r--r--
- move SlateEditor and dependencies to its own folder - remove Immutable - remove redux-persist-immutable - remobe redux-immutable - update libraries - added tests on store manipulations (accessor and reducers)

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
  };
}

export const createGroup = (name) => {
  const group = {
    name
  };

  return {
    type: types.GROUP_CREATE_ASYNC,
    group,
  };
}


export const resetAll = () => {
  return { type: types.SYNC_RESET_ALL }
}