client/src/actions/notesActions.js
author duong tam kien <tk@deveha.com>
Mon, 12 Jun 2017 11:39:47 +0200
changeset 27 6161392ca928
parent 26 930e486ad0a8
child 29 4cfeabef7d5e
permissions -rw-r--r--
titre et description et date

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,
      categories: data.categories,
    }
  };
}