2022-01-17 03:48:54 +00:00
|
|
|
/* global axios */
|
|
|
|
import ApiClient from './ApiClient';
|
|
|
|
|
|
|
|
class CustomViewsAPI extends ApiClient {
|
|
|
|
constructor() {
|
|
|
|
super('custom_filters', { accountScoped: true });
|
|
|
|
}
|
|
|
|
|
2022-01-21 22:11:59 +00:00
|
|
|
getCustomViewsByFilterType(type) {
|
|
|
|
return axios.get(`${this.url}?filter_type=${type}`);
|
2022-01-17 03:48:54 +00:00
|
|
|
}
|
2022-01-24 12:07:43 +00:00
|
|
|
|
|
|
|
deleteCustomViews(id, type) {
|
|
|
|
return axios.delete(`${this.url}/${id}?filter_type=${type}`);
|
|
|
|
}
|
2022-01-17 03:48:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export default new CustomViewsAPI();
|