mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-02 03:57:52 +00:00
feat: Add API module and Vuex store for Macros (#5603)
This commit is contained in:
16
app/javascript/dashboard/api/macros.js
Normal file
16
app/javascript/dashboard/api/macros.js
Normal 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();
|
||||
Reference in New Issue
Block a user