summaryrefslogtreecommitdiff
path: root/lib/api/helpers.rb
diff options
context:
space:
mode:
authorPatrick Derichs <pderichs@gitlab.com>2019-06-15 07:10:58 +0200
committerPatrick Derichs <pderichs@gitlab.com>2019-06-19 10:56:55 +0200
commit932a9a0c77a02e1d948f45cffe5e936e915ae0bc (patch)
treecb1766d65bc00f56c83a044b6fc19712a9473f69 /lib/api/helpers.rb
parentba952d53c5782e49b59ba3e5dd89c2c1eca02c80 (diff)
downloadgitlab-ce-932a9a0c77a02e1d948f45cffe5e936e915ae0bc.tar.gz
Use NotesFinder to fetch notes on API and Controllers
Fix missing iid query on NotesFinder Changed parameters of find_noteable, so changes across a few files were needed. MergeRequest also requires iid instead of id query Make NotesFinder fail with RecordNotFound again Add specs for target_iid Using RSpec tablesyntax for target_iid specs Revert "Using RSpec tablesyntax for target_iid specs" This reverts commit ba45c7f569a. Allow find_by! here Fix variable name Add readable check Revert "Add readable check" This reverts commit 9e3a1a7aa39. Remove unnecessary assignment Add required changes for EE Fix parameter count Reduce code duplication by extracting a noteable module method The call to find_noteable was redundant so multiple files and lines have changed in that commit to use the newly introduced module method `noteable`. Replace casecmp with include check Add parent_type parameter Revert "Reduce code duplication by extracting a noteable module method" This reverts commit 8c0923babff16. Method is no longer needed Check whether noteable can be read by user
Diffstat (limited to 'lib/api/helpers.rb')
-rw-r--r--lib/api/helpers.rb5
1 files changed, 0 insertions, 5 deletions
diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb
index 00bcf6b055b..70b5064c72a 100644
--- a/lib/api/helpers.rb
+++ b/lib/api/helpers.rb
@@ -183,11 +183,6 @@ module API
user_project.commit_by(oid: id)
end
- def find_project_snippet(id)
- finder_params = { project: user_project }
- SnippetsFinder.new(current_user, finder_params).find(id)
- end
-
# rubocop: disable CodeReuse/ActiveRecord
def find_merge_request_with_access(iid, access_level = :read_merge_request)
merge_request = user_project.merge_requests.find_by!(iid: iid)