diff options
author | Paul Slaughter <pslaughter@gitlab.com> | 2019-01-13 20:48:47 +0300 |
---|---|---|
committer | Paul Slaughter <pslaughter@gitlab.com> | 2019-02-04 07:11:44 +0300 |
commit | 1b929072f965c0a1ceced00fadd12766e8bcc2ca (patch) | |
tree | a048cbe1aa909f773200bfe02bdf7b9de2faa519 | |
parent | 609e5f7db54c33e32d40b70f854c0f3469e5484c (diff) |
Extract extension method from mr_widget_options
**Why?**
- This fixes the CE/EE difference
- More endpoints will be added in https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/9168
-rw-r--r-- | app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue b/app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue index 0ce9d271845..57c4dfbe3b7 100644 --- a/app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue +++ b/app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue @@ -142,8 +142,8 @@ export default { } }, methods: { - createService(store) { - const endpoints = { + getServiceEndpoints(store) { + return { mergePath: store.mergePath, mergeCheckPath: store.mergeCheckPath, cancelAutoMergePath: store.cancelAutoMergePath, @@ -154,7 +154,9 @@ export default { mergeActionsContentPath: store.mergeActionsContentPath, rebasePath: store.rebasePath, }; - return new MRWidgetService(endpoints); + }, + createService(store) { + return new MRWidgetService(this.getServiceEndpoints(store)); }, checkStatus(cb, isRebased) { return this.service |