diff options
Diffstat (limited to 'app/assets/javascripts/environments/services/environments_service.js')
-rw-r--r-- | app/assets/javascripts/environments/services/environments_service.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/app/assets/javascripts/environments/services/environments_service.js b/app/assets/javascripts/environments/services/environments_service.js new file mode 100644 index 00000000000..07040bf0d73 --- /dev/null +++ b/app/assets/javascripts/environments/services/environments_service.js @@ -0,0 +1,19 @@ +/* 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 }); + } +} |