client/src/actions/notesActions.js
author ymh <ymh.work@gmail.com>
Thu, 08 Jun 2017 17:57:57 +0200
changeset 24 3b3999550508
parent 17 877d8796b86d
child 26 930e486ad0a8
permissions -rw-r--r--
first data model for backend

import uuidV1 from 'uuid/v1';

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

export const addNote = (session, data) => {
  return {
    type: types.ADD_NOTE,
    note: {
      id: uuidV1(),
      session: session.id,
      raw: data.raw,
      plain: data.plain,
      html: data.html,
      startedAt: data.startedAt,
      finishedAt: data.finishedAt
    }
  };
}