2020-04-03 07:34:58 +00:00
|
|
|
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
|
2020-04-03 07:34:58 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
destroy: async (_, label) => {
|
|
|
|
try {
|
|
|
|
await conversationLabels.destroy(label);
|
|
|
|
} catch (error) {
|
2022-10-14 03:43:11 +00:00
|
|
|
// Ignore error
|
2020-04-03 07:34:58 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
export const mutations = {};
|
|
|
|
|
|
|
|
export default {
|
|
|
|
namespaced: true,
|
|
|
|
state,
|
|
|
|
getters,
|
|
|
|
actions,
|
|
|
|
mutations,
|
|
|
|
};
|