2017-08-17 22:00:37 +05:30
|
|
|
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();
|
|
|
|
}
|
2017-09-10 17:25:29 +05:30
|
|
|
|
|
|
|
// eslint-disable-next-line
|
|
|
|
postAction(endpoint) {
|
|
|
|
return Vue.http.post(`${endpoint}.json`);
|
|
|
|
}
|
2017-08-17 22:00:37 +05:30
|
|
|
}
|