refactor: move responsibility of creator assignment in the SetAttributesService

pull/10331/head
Christophe Bliard 3 years ago
parent daed5e1bee
commit 4722323d12
No known key found for this signature in database
GPG Key ID: 2BC07603210C3FA4
  1. 3
      modules/storages/app/services/storages/file_links/set_attributes_service.rb
  2. 1
      modules/storages/lib/api/v3/file_links/create_endpoint.rb

@ -27,4 +27,7 @@
#++
class Storages::FileLinks::SetAttributesService < ::BaseServices::SetAttributes
def set_default_attributes(_params)
model.creator ||= user
end
end

@ -76,7 +76,6 @@ module API::V3::FileLinks
def params_modifier
->(params) do
params[:creator_id] = current_user.id
params[:container_id] = work_package.id
params[:container_type] = work_package.class.name
params

Loading…
Cancel
Save