gitlab-org--gitlab-foss/app/assets/javascripts/issue_show/services/index.js
2018-01-02 17:59:04 -06:00

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);
}
}