diff options
author | Heinrich Lee Yu <hleeyu@gmail.com> | 2018-10-30 20:24:34 +0800 |
---|---|---|
committer | Heinrich Lee Yu <hleeyu@gmail.com> | 2018-10-30 21:37:58 +0800 |
commit | d01d1cc8ee61914f9f520611be36eee054ba5583 (patch) | |
tree | 6dca50693e2b8617f9772702943f1d57a8fff7e7 /lib | |
parent | e69a4b0809256b1d8930789e3eafef4b6b483971 (diff) | |
download | gitlab-ce-d01d1cc8ee61914f9f520611be36eee054ba5583.tar.gz |
Extract EE params in issues API to separate module
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/issues.rb | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/lib/api/issues.rb b/lib/api/issues.rb index 405fc30a2ed..e37083165f5 100644 --- a/lib/api/issues.rb +++ b/lib/api/issues.rb @@ -8,6 +8,15 @@ module API helpers ::Gitlab::IssuableMetadata + # EE::API::Issues would override the following helpers + helpers do + params :issues_params_ee do + end + + params :issue_params_ee do + end + end + helpers do # rubocop: disable CodeReuse/ActiveRecord def find_issues(args = {}) @@ -46,9 +55,11 @@ module API desc: 'Return issues for the given scope: `created_by_me`, `assigned_to_me` or `all`' optional :my_reaction_emoji, type: String, desc: 'Return issues reacted by the authenticated user by the given emoji' use :pagination + + use :issues_params_ee end - params :issue_params_ce do + params :issue_params do optional :description, type: String, desc: 'The description of an issue' optional :assignee_ids, type: Array[Integer], desc: 'The array of user IDs to assign issue' optional :assignee_id, type: Integer, desc: '[Deprecated] The ID of a user to assign issue' @@ -57,10 +68,8 @@ module API optional :due_date, type: String, desc: 'Date string in the format YEAR-MONTH-DAY' 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" - end - params :issue_params do - use :issue_params_ce + use :issue_params_ee end end |