debian-mirror-gitlab/app/assets/javascripts/issue_show/services/index.js

21 lines
444 B
JavaScript
Raw Normal View History

2018-03-17 18:26:18 +05:30
import axios from '../../lib/utils/axios_utils';
2017-09-10 17:25:29 +05:30
2017-08-17 22:00:37 +05:30
export default class Service {
2017-09-10 17:25:29 +05:30
constructor(endpoint) {
2018-03-17 18:26:18 +05:30
this.endpoint = `${endpoint}.json`;
this.realtimeEndpoint = `${endpoint}/realtime_changes`;
2017-09-10 17:25:29 +05:30
}
getData() {
2018-03-17 18:26:18 +05:30
return axios.get(this.realtimeEndpoint);
2017-09-10 17:25:29 +05:30
}
2019-12-04 20:38:33 +05:30
deleteIssuable(payload) {
return axios.delete(this.endpoint, { params: payload });
2017-08-17 22:00:37 +05:30
}
2017-09-10 17:25:29 +05:30
updateIssuable(data) {
2018-03-17 18:26:18 +05:30
return axios.put(this.endpoint, data);
2017-08-17 22:00:37 +05:30
}
}