gitlab-org--gitlab-foss/app/assets/javascripts/environments/services/environments_service.js
2017-03-17 17:30:32 +00:00

19 lines
424 B
JavaScript

/* eslint-disable class-methods-use-this */
import Vue from 'vue';
import VueResource from 'vue-resource';
Vue.use(VueResource);
export default class EnvironmentsService {
constructor(endpoint) {
this.environments = Vue.resource(endpoint);
}
get(scope, page) {
return this.environments.get({ scope, page });
}
postAction(endpoint) {
return Vue.http.post(endpoint, {}, { emulateJSON: true });
}
}