2019-03-12 13:13:20 +00:00
|
|
|
/** @format */
|
|
|
|
|
|
|
|
const updateNote = operations => ( noteId, noteFields ) => {
|
|
|
|
const resourceKey = 'note';
|
|
|
|
operations.update( [ resourceKey ], { [ resourceKey ]: { noteId, ...noteFields } } );
|
|
|
|
};
|
|
|
|
|
2019-05-24 20:22:46 +00:00
|
|
|
const triggerNoteAction = operations => ( noteId, actionId ) => {
|
|
|
|
const resourceKey = 'note-action';
|
|
|
|
operations.update( [ resourceKey ], { [ resourceKey ]: { noteId, actionId } } );
|
|
|
|
};
|
|
|
|
|
2019-03-12 13:13:20 +00:00
|
|
|
export default {
|
|
|
|
updateNote,
|
2019-05-24 20:22:46 +00:00
|
|
|
triggerNoteAction,
|
2019-03-12 13:13:20 +00:00
|
|
|
};
|