diff options
author | Imre Farkas <ifarkas@gitlab.com> | 2019-05-24 18:48:20 +0200 |
---|---|---|
committer | Imre Farkas <ifarkas@gitlab.com> | 2019-05-27 17:58:28 +0200 |
commit | 2cca0bf349b2d956f0b71a4056ca070066e25fb9 (patch) | |
tree | 6bc3647772b25972ea2481934382694027f279df | |
parent | 1fec9ebed4d2e35301c893871334d3ae1dfe1492 (diff) | |
download | gitlab-ce-if-10137-ee_specific_lines_issues_api.tar.gz |
Move EE specific lines in API::Issuesif-10137-ee_specific_lines_issues_api
-rw-r--r-- | lib/api/helpers/issues_helpers.rb | 8 | ||||
-rw-r--r-- | lib/api/issues.rb | 14 |
2 files changed, 10 insertions, 12 deletions
diff --git a/lib/api/helpers/issues_helpers.rb b/lib/api/helpers/issues_helpers.rb index fc66cec5341..5b7199fddb0 100644 --- a/lib/api/helpers/issues_helpers.rb +++ b/lib/api/helpers/issues_helpers.rb @@ -3,6 +3,14 @@ module API module Helpers module IssuesHelpers + extend Grape::API::Helpers + + params :optional_issue_params_ee do + end + + params :optional_issues_params_ee do + end + def self.update_params_at_least_one_of [ :assignee_id, diff --git a/lib/api/issues.rb b/lib/api/issues.rb index 0b4da01f3c8..56960a2eb64 100644 --- a/lib/api/issues.rb +++ b/lib/api/issues.rb @@ -9,16 +9,6 @@ module API before { authenticate_non_get! } helpers do - if Gitlab.ee? - params :issues_params_ee do - optional :weight, types: [Integer, String], integer_none_any: true, desc: 'The weight of the issue' - end - - params :issue_params_ee do - optional :weight, type: Integer, desc: 'The weight of the issue' - end - end - params :issues_stats_params do optional :labels, type: Array[String], coerce_with: Validations::Types::LabelsList.coerce, desc: 'Comma-separated list of label names' optional :milestone, type: String, desc: 'Milestone title' @@ -47,7 +37,7 @@ module API optional :my_reaction_emoji, type: String, desc: 'Return issues reacted by the authenticated user by the given emoji' optional :confidential, type: Boolean, desc: 'Filter confidential or public issues' - use :issues_params_ee if Gitlab.ee? + use :optional_issues_params_ee end params :issues_params do @@ -73,7 +63,7 @@ module API optional :confidential, type: Boolean, desc: 'Boolean parameter if the issue should be confidential' optional :discussion_locked, type: Boolean, desc: " Boolean parameter indicating if the issue's discussion is locked" - use :issue_params_ee if Gitlab.ee? + use :optional_issue_params_ee end end |