Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/deploy_keys/service/index.js')
-rw-r--r--app/assets/javascripts/deploy_keys/service/index.js10
1 files changed, 4 insertions, 6 deletions
diff --git a/app/assets/javascripts/deploy_keys/service/index.js b/app/assets/javascripts/deploy_keys/service/index.js
index 268a37008c5..10333752936 100644
--- a/app/assets/javascripts/deploy_keys/service/index.js
+++ b/app/assets/javascripts/deploy_keys/service/index.js
@@ -2,20 +2,18 @@ import axios from '~/lib/utils/axios_utils';
export default class DeployKeysService {
constructor(endpoint) {
- this.axios = axios.create({
- baseURL: endpoint,
- });
+ this.endpoint = endpoint;
}
getKeys() {
- return this.axios.get().then(response => response.data);
+ return axios.get(this.endpoint).then(response => response.data);
}
enableKey(id) {
- return this.axios.put(`${id}/enable`).then(response => response.data);
+ return axios.put(`${this.endpoint}/${id}/enable`).then(response => response.data);
}
disableKey(id) {
- return this.axios.put(`${id}/disable`).then(response => response.data);
+ return axios.put(`${this.endpoint}/${id}/disable`).then(response => response.data);
}
}