|
|
|
@ -51,7 +51,7 @@ module API |
|
|
|
|
end |
|
|
|
|
post do |
|
|
|
|
authorize(:manage_work_package_relations, context: @work_package.project) |
|
|
|
|
declared_params = declared(params).reject { |key, value| key.to_sym == :id || value.nil? } |
|
|
|
|
declared_params = declared(params).with_indifferent_access.reject { |key, value| key == :id || value.nil? } |
|
|
|
|
|
|
|
|
|
relation = @work_package.new_relation.tap do |r| |
|
|
|
|
r.to = WorkPackage.visible.find_by id: declared_params['to_id'] |
|
|
|
|