summaryrefslogtreecommitdiff
path: root/lib/api/project_snippets.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-09-02 09:10:23 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-09-02 09:10:23 +0000
commit4b9ace6c1fead1b44f173eaee0cfaa58f46a258a (patch)
treea411c934419690755623a57ff7ea5f47050050e2 /lib/api/project_snippets.rb
parent03a521732276f8abc4ba069dd985b22cd9bc5929 (diff)
downloadgitlab-ce-4b9ace6c1fead1b44f173eaee0cfaa58f46a258a.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/api/project_snippets.rb')
-rw-r--r--lib/api/project_snippets.rb6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/api/project_snippets.rb b/lib/api/project_snippets.rb
index 0d27a3eca26..bed86e9990d 100644
--- a/lib/api/project_snippets.rb
+++ b/lib/api/project_snippets.rb
@@ -64,12 +64,8 @@ module API
end
post ":id/snippets" do
authorize! :create_snippet, user_project
- snippet_params = declared_params(include_missing: false).tap do |create_args|
- create_args[:request] = request
- create_args[:api] = true
- process_file_args(create_args)
- end
+ snippet_params = process_create_params(declared_params(include_missing: false))
service_response = ::Snippets::CreateService.new(user_project, current_user, snippet_params).execute
snippet = service_response.payload[:snippet]