Commit 06818655 authored by Filipa Lacerda's avatar Filipa Lacerda

Update method name

parent fd67916f
...@@ -66,7 +66,7 @@ export default { ...@@ -66,7 +66,7 @@ export default {
updateContent(parameters) { updateContent(parameters) {
this.updateInternalState(parameters); this.updateInternalState(parameters);
// fetch new data // fetch new data
return this.service.get(this.requestData) return this.service.fetchEnvironments(this.requestData)
.then(response => this.successCallback(response)) .then(response => this.successCallback(response))
.then(() => { .then(() => {
// restart polling // restart polling
...@@ -101,7 +101,7 @@ export default { ...@@ -101,7 +101,7 @@ export default {
fetchEnvironments() { fetchEnvironments() {
this.isLoading = true; this.isLoading = true;
return this.service.get(this.requestData) return this.service.fetchEnvironments(this.requestData)
.then(this.successCallback) .then(this.successCallback)
.catch(this.errorCallback); .catch(this.errorCallback);
}, },
...@@ -137,7 +137,7 @@ export default { ...@@ -137,7 +137,7 @@ export default {
this.poll = new Poll({ this.poll = new Poll({
resource: this.service, resource: this.service,
method: 'get', method: 'fetchEnvironments',
data: this.requestData, data: this.requestData,
successCallback: this.successCallback, successCallback: this.successCallback,
errorCallback: this.errorCallback, errorCallback: this.errorCallback,
......
...@@ -6,7 +6,7 @@ export default class EnvironmentsService { ...@@ -6,7 +6,7 @@ export default class EnvironmentsService {
this.folderResults = 3; this.folderResults = 3;
} }
get(options = {}) { fetchEnvironments(options = {}) {
const { scope, page } = options; const { scope, page } = options;
return axios.get(this.environmentsEndpoint, { params: { scope, page } }); return axios.get(this.environmentsEndpoint, { params: { scope, page } });
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment