gitlab-org--gitlab-foss/app/assets/javascripts/pipelines/services/pipeline_service.js
2017-06-02 13:24:42 +00:00

19 lines
363 B
JavaScript

import Vue from 'vue';
import VueResource from 'vue-resource';
Vue.use(VueResource);
export default class PipelineService {
constructor(endpoint) {
this.pipeline = Vue.resource(endpoint);
}
getPipeline() {
return this.pipeline.get();
}
// eslint-disable-next-line
postAction(endpoint) {
return Vue.http.post(`${endpoint}.json`);
}
}