client/src/actions/notesActions.js
author duong tam kien <tk@deveha.com>
Wed, 07 Jun 2017 18:18:44 +0200
changeset 20 a8300ef1876e
parent 17 877d8796b86d
child 26 930e486ad0a8
permissions -rw-r--r--
start of sidebar and navbar

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