client/src/actions/notesActions.js
changeset 59 1eb52770eefa
parent 58 f16a080e0bc4
child 62 b2514a9bcd49
equal deleted inserted replaced
58:f16a080e0bc4 59:1eb52770eefa
     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,
     7     type: types.ADD_NOTE_ASYNC,
     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,
    23     type: types.LOAD_NOTES_BY_SESSION_ASYNC,
    24     session: session
    24     session: session
    25   }
    25   }
    26 }
    26 }