diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-09-02 21:10:40 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-09-02 21:10:40 +0300 |
commit | 4e06ca9e7d67aee59d691a363dabba46d53d34ba (patch) | |
tree | 350af7ee7d4b8d0d22b4f251141f486fa8ae181a /app/assets/javascripts/deploy_keys | |
parent | 8e3523281051490ff696bfd85bea1195c046c87c (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/deploy_keys')
-rw-r--r-- | app/assets/javascripts/deploy_keys/service/index.js | 10 |
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); } } |