woocommerce/plugins/woocommerce-admin/client/wc-api/notes/mutations.js

17 lines
438 B
JavaScript
Raw Normal View History

/** @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 } } );
};
export default {
updateNote,
2019-05-24 20:22:46 +00:00
triggerNoteAction,
};