Chatwoot/app/javascript/dashboard/api/automation.js
Tejaswini Chile 1b3011b27b
fix: Add Attachment endpoint to save file against automation rule (#4480)
Co-authored-by: fayazara <fayazara@gmail.com>
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-04-24 12:02:40 +05:30

22 lines
469 B
JavaScript

/* global axios */
import ApiClient from './ApiClient';
class AutomationsAPI extends ApiClient {
constructor() {
super('automation_rules', { accountScoped: true });
}
clone(automationId) {
return axios.post(`${this.url}/${automationId}/clone`);
}
attachment(file) {
return axios.post(`${this.url}/attach_file`, file, {
headers: {
'Content-Type': 'multipart/form-data',
},
});
}
}
export default new AutomationsAPI();