Accept encoding attribute in files API
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
parent
7001ad2dda
commit
4f2e9fb8e5
1 changed files with 2 additions and 2 deletions
|
@ -18,7 +18,7 @@ module API
|
|||
#
|
||||
post ":id/repository/files" do
|
||||
required_attributes! [:file_path, :branch_name, :content, :commit_message]
|
||||
attrs = attributes_for_keys [:file_path, :branch_name, :content, :commit_message]
|
||||
attrs = attributes_for_keys [:file_path, :branch_name, :content, :commit_message, :encoding]
|
||||
branch_name = attrs.delete(:branch_name)
|
||||
file_path = attrs.delete(:file_path)
|
||||
result = ::Files::CreateContext.new(user_project, current_user, attrs, branch_name, file_path).execute
|
||||
|
@ -48,7 +48,7 @@ module API
|
|||
#
|
||||
put ":id/repository/files" do
|
||||
required_attributes! [:file_path, :branch_name, :content, :commit_message]
|
||||
attrs = attributes_for_keys [:file_path, :branch_name, :content, :commit_message]
|
||||
attrs = attributes_for_keys [:file_path, :branch_name, :content, :commit_message, :encoding]
|
||||
branch_name = attrs.delete(:branch_name)
|
||||
file_path = attrs.delete(:file_path)
|
||||
result = ::Files::UpdateContext.new(user_project, current_user, attrs, branch_name, file_path).execute
|
||||
|
|
Loading…
Reference in a new issue