client/src/actions/sessionsActions.js
author Alexandre Segura <mex.zktk@gmail.com>
Tue, 06 Jun 2017 15:56:41 +0200
changeset 19 f1b125b95fe9
parent 12 48ddaa42b810
child 29 4cfeabef7d5e
permissions -rw-r--r--
Introduce "annotation" plugin. - Wrap mark around text. - Store selected text in mark data. - Colorize selected text.

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