summaryrefslogtreecommitdiff
path: root/lib/api/projects.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/projects.rb')
-rw-r--r--lib/api/projects.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/api/projects.rb b/lib/api/projects.rb
index 4a2634720eb..1d9004f8eed 100644
--- a/lib/api/projects.rb
+++ b/lib/api/projects.rb
@@ -40,7 +40,7 @@ module Gitlab
post do
params[:code] ||= params[:name]
params[:path] ||= params[:name]
- attrs = existed_attributes [:code,
+ attrs = attributes_for_keys [:code,
:path,
:name,
:description,
@@ -207,7 +207,7 @@ module Gitlab
# Example Request:
# POST /projects/:id/snippets
post ":id/snippets" do
- attrs = existed_attributes [:title, :file_name]
+ attrs = attributes_for_keys [:title, :file_name]
attrs[:expires_at] = params[:lifetime] if params[:lifetime].present?
attrs[:content] = params[:code] if params[:code].present?
@snippet = user_project.snippets.new attrs
@@ -235,7 +235,7 @@ module Gitlab
@snippet = user_project.snippets.find(params[:snippet_id])
authorize! :modify_snippet, @snippet
- attrs = existed_attributes [:title, :file_name]
+ attrs = attributes_for_keys [:title, :file_name]
attrs[:expires_at] = params[:lifetime] if params[:lifetime].present?
attrs[:content] = params[:code] if params[:code].present?