diff options
Diffstat (limited to 'app/assets/javascripts/group_settings')
-rw-r--r-- | app/assets/javascripts/group_settings/components/shared_runners_form.vue | 7 | ||||
-rw-r--r-- | app/assets/javascripts/group_settings/mount_shared_runners.js | 4 |
2 files changed, 5 insertions, 6 deletions
diff --git a/app/assets/javascripts/group_settings/components/shared_runners_form.vue b/app/assets/javascripts/group_settings/components/shared_runners_form.vue index 06aea26830d..8011090f1cb 100644 --- a/app/assets/javascripts/group_settings/components/shared_runners_form.vue +++ b/app/assets/javascripts/group_settings/components/shared_runners_form.vue @@ -1,6 +1,6 @@ <script> import { GlToggle, GlAlert } from '@gitlab/ui'; -import axios from '~/lib/utils/axios_utils'; +import { updateGroup } from '~/api/groups_api'; import { I18N_UPDATE_ERROR_MESSAGE, I18N_REFRESH_MESSAGE } from '../constants'; export default { @@ -9,7 +9,7 @@ export default { GlAlert, }, inject: [ - 'updatePath', + 'groupId', 'sharedRunnersSetting', 'parentSharedRunnersSetting', 'runnerEnabledValue', @@ -54,8 +54,7 @@ export default { this.isLoading = true; - axios - .put(this.updatePath, { shared_runners_setting: setting }) + updateGroup(this.groupId, { shared_runners_setting: setting }) .then(() => { this.value = setting; }) diff --git a/app/assets/javascripts/group_settings/mount_shared_runners.js b/app/assets/javascripts/group_settings/mount_shared_runners.js index aeb6d57a11a..e7e104d61b3 100644 --- a/app/assets/javascripts/group_settings/mount_shared_runners.js +++ b/app/assets/javascripts/group_settings/mount_shared_runners.js @@ -5,7 +5,7 @@ export default (containerId = 'update-shared-runners-form') => { const containerEl = document.getElementById(containerId); const { - updatePath, + groupId, sharedRunnersSetting, parentSharedRunnersSetting, runnerEnabledValue, @@ -16,7 +16,7 @@ export default (containerId = 'update-shared-runners-form') => { return new Vue({ el: containerEl, provide: { - updatePath, + groupId, sharedRunnersSetting, parentSharedRunnersSetting, runnerEnabledValue, |