debian-mirror-gitlab/app/assets/javascripts/pipelines/services/pipeline_service.js

17 lines
355 B
JavaScript
Raw Normal View History

2018-10-15 14:42:47 +05:30
import axios from '../../lib/utils/axios_utils';
2017-08-17 22:00:37 +05:30
export default class PipelineService {
constructor(endpoint) {
2018-10-15 14:42:47 +05:30
this.pipeline = endpoint;
2017-08-17 22:00:37 +05:30
}
2019-05-03 19:53:19 +05:30
getPipeline(params) {
return axios.get(this.pipeline, { params });
2017-08-17 22:00:37 +05:30
}
2017-09-10 17:25:29 +05:30
2018-10-15 14:42:47 +05:30
// eslint-disable-next-line class-methods-use-this
2017-09-10 17:25:29 +05:30
postAction(endpoint) {
2018-10-15 14:42:47 +05:30
return axios.post(`${endpoint}.json`);
2017-09-10 17:25:29 +05:30
}
2017-08-17 22:00:37 +05:30
}