feat: Add API module and Vuex store for Macros (#5603)

This commit is contained in:
Fayaz Ahmed
2022-10-12 11:24:17 +05:30
committed by GitHub
parent 9b5c0de0ea
commit 6c160ccad5
8 changed files with 510 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
/* global axios */
import ApiClient from './ApiClient';
class MacrosAPI extends ApiClient {
constructor() {
super('macros', { accountScoped: true });
}
executeMacro({ macroId, conversationIds }) {
return axios.post(`${this.url}/${macroId}/execute`, {
conversation_ids: conversationIds,
});
}
}
export default new MacrosAPI();