client/src/actions/authActions.js
author ymh <ymh.work@gmail.com>
Tue, 18 Jul 2017 17:59:28 +0200
changeset 118 2cb8d11aa9ca
parent 107 e6f85e26b08c
child 129 d48946d164c6
permissions -rw-r--r--
make description field optional for group

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 purgeOutbox = () => {
  return { type: types.OFFLINE_PURGE_OUTBOX }
}