client/src/actions/notesActions.js
changeset 58 f16a080e0bc4
parent 29 4cfeabef7d5e
child 59 1eb52770eefa
equal deleted inserted replaced
57:2e4e9f9ebc4f 58:f16a080e0bc4
     2 
     2 
     3 import * as types from '../constants/actionTypes';
     3 import * as types from '../constants/actionTypes';
     4 
     4 
     5 export const addNote = (session, data) => {
     5 export const addNote = (session, data) => {
     6   return {
     6   return {
     7     type: types.ADD_NOTE_ASYNC,
     7     type: types.ADD_NOTE,
     8     note: {
     8     note: {
     9       _id: uuidV1(),
     9       _id: uuidV1(),
    10       session: session._id,
    10       session: session._id,
    11       raw: data.raw,
    11       raw: data.raw,
    12       plain: data.plain,
    12       plain: data.plain,
    18   };
    18   };
    19 }
    19 }
    20 
    20 
    21 export const loadNotesBySession = (session) => {
    21 export const loadNotesBySession = (session) => {
    22   return {
    22   return {
    23     type: types.LOAD_NOTES_BY_SESSION_ASYNC,
    23     type: types.LOAD_NOTES_BY_SESSION,
    24     session: session
    24     session: session
    25   }
    25   }
    26 }
    26 }