client/src/actions/sessionsActions.js
author ymh <ymh.work@gmail.com>
Wed, 14 Jun 2017 18:08:03 +0200
changeset 36 36210c4f019f
parent 30 4d93f4ed95bc
child 58 f16a080e0bc4
permissions -rw-r--r--
reorganize urls and add user management api urls

import uuidV1 from 'uuid/v1';

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

export const createSession = () => {
  return {
    type: types.CREATE_SESSION_ASYNC,
    session: {
      _id: uuidV1(),
      date: new Date(),
      title: '',
      description: '',
    }
  };
}

export const updateSession = (session, values) => {
  return {
    type: types.UPDATE_SESSION_ASYNC,
    session: session,
    values: values,
  };
}

export const loadSessions = () => {
  return {
    type: types.LOAD_SESSIONS_ASYNC
  }
}