diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2017-03-27 19:37:26 +0300 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2017-03-28 16:10:31 +0300 |
commit | adec9194ef9b825a3a79dc262975987012639f23 (patch) | |
tree | 5f6fdbb87e3baadeff1b24931dcfcbae69402569 /app/assets/javascripts/environments/services | |
parent | f6f56dddfcfed352dfba8dc32dad554096552a7d (diff) |
Adds expandable folder back.
Makes request to get environments
Diffstat (limited to 'app/assets/javascripts/environments/services')
-rw-r--r-- | app/assets/javascripts/environments/services/environments_service.js | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/app/assets/javascripts/environments/services/environments_service.js b/app/assets/javascripts/environments/services/environments_service.js index 07040bf0d73..d5729c9d1c5 100644 --- a/app/assets/javascripts/environments/services/environments_service.js +++ b/app/assets/javascripts/environments/services/environments_service.js @@ -6,7 +6,14 @@ Vue.use(VueResource); export default class EnvironmentsService { constructor(endpoint) { - this.environments = Vue.resource(endpoint); + /** + * FIX ME: This should be sent by backend. + */ + const customActions = { + folderContent: { method: 'GET', url: `${window.location.pathname}/folders{/name}?perPage=2` }, + }; + + this.environments = Vue.resource(endpoint, {}, customActions); } get(scope, page) { @@ -16,4 +23,9 @@ export default class EnvironmentsService { postAction(endpoint) { return Vue.http.post(endpoint, {}, { emulateJSON: true }); } + + getFolderContent(folderName) { + debugger + return this.environments.folderContent({ name: folderName }); + } } |