stash
This commit is contained in:
parent
7c10fb76b9
commit
db1e5a8249
2 changed files with 13 additions and 11 deletions
|
@ -430,6 +430,14 @@ const store = createStore({
|
|||
commit('setMessageTemplates', data);
|
||||
}
|
||||
},
|
||||
async updateMessageTemplate({commit, state}, template) {
|
||||
const {data, success} = await http.patch(`/2/message_templates/${template.id}/`,
|
||||
{'message': template.message}, state.user.token);
|
||||
const {data: newTemplates, success: newSuccess} = await http.get('/2/message_templates/', state.user.token);
|
||||
if (data && success) {
|
||||
commit('setMessageTemplates', data);
|
||||
}
|
||||
},
|
||||
async fetchMessageTemplateVariables({commit, state}) {
|
||||
const {data, success} = await http.get('/2/message_template_variables/', state.user.token);
|
||||
if (data && success) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue