Chatwoot/app/javascript/dashboard/api/customViews.js
Sivin Varghese b304f5a826
feat: Adds the ability to delete a segment (#3836)
* feat: Adds the ability to delete a segment

* Minor fixes

* Small changes
2022-01-24 17:37:43 +05:30

18 lines
416 B
JavaScript

/* global axios */
import ApiClient from './ApiClient';
class CustomViewsAPI extends ApiClient {
constructor() {
super('custom_filters', { accountScoped: true });
}
getCustomViewsByFilterType(type) {
return axios.get(`${this.url}?filter_type=${type}`);
}
deleteCustomViews(id, type) {
return axios.delete(`${this.url}/${id}?filter_type=${type}`);
}
}
export default new CustomViewsAPI();