diff options
author | Luke Duncalfe <lduncalfe@eml.cc> | 2019-08-14 13:34:42 +1200 |
---|---|---|
committer | Luke Duncalfe <lduncalfe@eml.cc> | 2019-08-15 15:08:34 +1200 |
commit | 88746f5311a2624d99c3639daf2760c6715d5670 (patch) | |
tree | 098fee08c628771f755521a83ec1374f3c5e6077 /lib/api/todos.rb | |
parent | 7c9fb3c61715acb7cb2bfcbad1a12a5ef66d9bbd (diff) | |
download | gitlab-ce-88746f5311a2624d99c3639daf2760c6715d5670.tar.gz |
CE-specific changes to allow design Todos13494-todo-s-not-rendering-when-there-is-a-design-management-related-todo-ce
CE-specific changes for:
https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/15129
Co-Authored-By: Alex Kalderimis <akalderimis@gitlab.com>
Co-Authored-By: Luke Duncalfe <lduncalfe@eml.cc>
Diffstat (limited to 'lib/api/todos.rb')
-rw-r--r-- | lib/api/todos.rb | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/api/todos.rb b/lib/api/todos.rb index 7260ecfb5ee..404675bfaec 100644 --- a/lib/api/todos.rb +++ b/lib/api/todos.rb @@ -13,6 +13,13 @@ module API 'issues' => ->(iid) { find_project_issue(iid) } }.freeze + helpers do + # EE::API::Todos would override this method + def find_todos + TodosFinder.new(current_user, params).execute + end + end + params do requires :id, type: String, desc: 'The ID of a project' end @@ -41,10 +48,6 @@ module API resource :todos do helpers do - def find_todos - TodosFinder.new(current_user, params).execute - end - def issuable_and_awardable?(type) obj_type = Object.const_get(type) @@ -107,3 +110,5 @@ module API end end end + +API::Todos.prepend_if_ee('EE::API::Todos') |