client/src/actions/sessionsActions.js
author ymh <ymh.work@gmail.com>
Thu, 08 Jun 2017 17:57:57 +0200
changeset 24 3b3999550508
parent 12 48ddaa42b810
child 29 4cfeabef7d5e
permissions -rw-r--r--
first data model for backend

import uuidV1 from 'uuid/v1';

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

export const createNewSession = () => {
  return {
    type: types.NEW_SESSION,
    session: {
      id: uuidV1(),
      date: new Date(),
      title: '',
      description: '',
    }
  };
}

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