diff --git a/package.json b/package.json index 565efe38..2ba5a468 100644 --- a/package.json +++ b/package.json @@ -59,8 +59,8 @@ "@graphql-eslint/eslint-plugin": "^4.3.0", "@graphql-tools/mock": "^9.0.9", "@jest-mock/express": "^2.0.2", - "@ndla/types-backend": "^1.0.1", - "@ndla/types-embed": "^5.0.6-alpha.0", + "@ndla/types-backend": "^1.0.5", + "@ndla/types-embed": "^5.0.7-alpha.0", "@ndla/types-taxonomy": "^1.0.34", "@types/compression": "^1.7.2", "@types/cors": "^2.8.4", diff --git a/src/api/embedsApi.ts b/src/api/embedsApi.ts index a6d5bbc1..485c1612 100644 --- a/src/api/embedsApi.ts +++ b/src/api/embedsApi.ts @@ -175,7 +175,7 @@ const brightcoveMeta: Fetch = async ({ embedData, context }) return { ...video, - copyright: getBrightcoveCopyright(video.custom_fields, context.language), + copyright: getBrightcoveCopyright(video.custom_fields, context.language, video.link?.url), sources, }; }; diff --git a/src/utils/brightcoveUtils.ts b/src/utils/brightcoveUtils.ts index 132e4d89..3250290d 100644 --- a/src/utils/brightcoveUtils.ts +++ b/src/utils/brightcoveUtils.ts @@ -98,6 +98,7 @@ export const getContributorGroups = (fields: Record) => { export const getBrightcoveCopyright = ( customFields: Record, locale: string, + origin?: string, ): BrightcoveCopyright | undefined => { const licenseCode = getLicenseByNBTitle(customFields.license); if (!licenseCode) { @@ -111,6 +112,7 @@ export const getBrightcoveCopyright = ( description: license.description, url: license.url, }, + origin, ...getContributorGroups(customFields), }; }; diff --git a/yarn.lock b/yarn.lock index e1a938de..998a7baa 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2141,17 +2141,17 @@ __metadata: languageName: node linkType: hard -"@ndla/types-backend@npm:^1.0.1": - version: 1.0.1 - resolution: "@ndla/types-backend@npm:1.0.1" - checksum: 10c0/417fd69c5fc526f4b90371b0d00162909c2cec496e4228230990839c10d2c5a0a0caf562cb4e7e44c8bf66b4583b826d87f3aababaed6e3a9e727ba8385f0e1b +"@ndla/types-backend@npm:^1.0.5": + version: 1.0.5 + resolution: "@ndla/types-backend@npm:1.0.5" + checksum: 10c0/a7659642a91b080b69449353b9f8f2e0e43a86bbb4226fdd37de54beb227b7d3c1c0292566635e1261f40b954eb3963711f965c5011e2a7c66153398b88743df languageName: node linkType: hard -"@ndla/types-embed@npm:^5.0.6-alpha.0": - version: 5.0.6-alpha.0 - resolution: "@ndla/types-embed@npm:5.0.6-alpha.0" - checksum: 10c0/945149c3725851e97c38f44e14cf2c7d4ac3bbc2988f78509aef389c71fa73dc4beed45520661539c5a251235484651a85c86ab84738321fe2787fe65fea3e14 +"@ndla/types-embed@npm:^5.0.7-alpha.0": + version: 5.0.7-alpha.0 + resolution: "@ndla/types-embed@npm:5.0.7-alpha.0" + checksum: 10c0/3112fb1bebb4e3c2a689506dbcb4206e37f001b369aa811c6040e09939db8b09d8bec785e03c1d1d15a33e2cd8cbdb0b5fdcccf19eccd0483fcfa3f803077006 languageName: node linkType: hard @@ -7460,8 +7460,8 @@ __metadata: "@graphql-tools/schema": "npm:^10.0.11" "@jest-mock/express": "npm:^2.0.2" "@ndla/licenses": "npm:^8.0.3-alpha.0" - "@ndla/types-backend": "npm:^1.0.1" - "@ndla/types-embed": "npm:^5.0.6-alpha.0" + "@ndla/types-backend": "npm:^1.0.5" + "@ndla/types-embed": "npm:^5.0.7-alpha.0" "@ndla/types-taxonomy": "npm:^1.0.34" "@types/compression": "npm:^1.7.2" "@types/cors": "npm:^2.8.4"