Added endpoint for deleting relationships

pull/1645/head
Marek Takac 10 years ago committed by Hagen Schink
parent 613b71df0f
commit 651d524194
  1. 11
      lib/api/v3/relations/relations_api.rb

@ -28,6 +28,17 @@ module API
raise ::API::Errors::Validation.new(relation)
end
end
namespace ':id' do
delete do
# authorize
relation = Relation.find(params[:id])
model = ::API::V3::WorkPackages::RelationModel.new(relation)
representer = ::API::V3::WorkPackages::RelationRepresenter.new(model)
relation.delete
representer.to_json
end
end
end
end

Loading…
Cancel
Save