Merge pull request #13451 from mkllnk/remove-person

Remove Person from product catalog
This commit is contained in:
David Cook
2025-08-12 09:42:40 +10:00
committed by GitHub
2 changed files with 0 additions and 7 deletions

View File

@@ -7,16 +7,12 @@ module DfcProvider
before_action :check_enterprise
def index
person = PersonBuilder.person(current_user)
enterprises = current_user.enterprises.map do |enterprise|
EnterpriseBuilder.enterprise(enterprise)
end
person.affiliatedOrganizations = enterprises
catalog_items = enterprises.flat_map(&:catalogItems)
render json: DfcIo.export(
person,
*enterprises,
*catalog_items,
*catalog_items.map(&:product),

View File

@@ -151,9 +151,6 @@ paths:
value:
"@context": https://www.datafoodconsortium.org
"@graph":
- "@id": http://test.host/api/dfc/persons/12345
"@type": dfc-b:Person
dfc-b:affiliates: http://test.host/api/dfc/enterprises/10000
- "@id": http://test.host/api/dfc/enterprises/10000
"@type": dfc-b:Enterprise
dfc-b:hasAddress: http://test.host/api/dfc/addresses/40000