Chatwoot/app/javascript/widget/store/modules/conversationLabels.js

33 lines
542 B
JavaScript
Raw Normal View History

import conversationLabels from '../../api/conversationLabels';
const state = {};
export const getters = {};
export const actions = {
create: async (_, label) => {
try {
await conversationLabels.create(label);
} catch (error) {
2022-10-14 03:43:11 +00:00
// Ignore error
}
},
destroy: async (_, label) => {
try {
await conversationLabels.destroy(label);
} catch (error) {
2022-10-14 03:43:11 +00:00
// Ignore error
}
},
};
export const mutations = {};
export default {
namespaced: true,
state,
getters,
actions,
mutations,
};