client/src/actions/notesActions.js
author ymh <ymh.work@gmail.com>
Wed, 21 Jun 2017 08:45:29 +0200
changeset 70 dff58e6bea47
parent 66 f402435be429
child 74 043477fd5c5c
permissions -rw-r--r--
Ass src/sass in the watch list for node-sass

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