gitlab-org--gitlab-foss/app/assets/javascripts/pipelines/services/pipeline_service.js

22 lines
485 B
JavaScript
Raw Normal View History

import axios from '../../lib/utils/axios_utils';
export default class PipelineService {
constructor(endpoint) {
this.pipeline = endpoint;
}
2019-03-07 05:29:46 -05:00
getPipeline(params) {
return axios.get(this.pipeline, { params });
}
// eslint-disable-next-line class-methods-use-this
deleteAction(endpoint) {
return axios.delete(`${endpoint}.json`);
}
// eslint-disable-next-line class-methods-use-this
postAction(endpoint) {
return axios.post(`${endpoint}.json`);
}
}