debian-mirror-gitlab/app/assets/javascripts/issue_show/services/index.js
2018-03-17 18:26:18 +05:30

20 lines
416 B
JavaScript

import axios from '../../lib/utils/axios_utils';
export default class Service {
constructor(endpoint) {
this.endpoint = `${endpoint}.json`;
this.realtimeEndpoint = `${endpoint}/realtime_changes`;
}
getData() {
return axios.get(this.realtimeEndpoint);
}
deleteIssuable() {
return axios.delete(this.endpoint);
}
updateIssuable(data) {
return axios.put(this.endpoint, data);
}
}