Skip to content

Commit

Permalink
Add origin with video-link-url
Browse files Browse the repository at this point in the history
  • Loading branch information
gunnarvelle committed Jan 10, 2025
1 parent 0e6c03b commit 1c8331f
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 13 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/api/embedsApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ const brightcoveMeta: Fetch<BrightcoveMetaData> = async ({ embedData, context })

return {
...video,
copyright: getBrightcoveCopyright(video.custom_fields, context.language),
copyright: getBrightcoveCopyright(video.custom_fields, context.language, video.link?.url),
sources,
};
};
Expand Down
2 changes: 2 additions & 0 deletions src/utils/brightcoveUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ export const getContributorGroups = (fields: Record<string, string>) => {
export const getBrightcoveCopyright = (
customFields: Record<string, string>,
locale: string,
origin?: string,
): BrightcoveCopyright | undefined => {
const licenseCode = getLicenseByNBTitle(customFields.license);
if (!licenseCode) {
Expand All @@ -111,6 +112,7 @@ export const getBrightcoveCopyright = (
description: license.description,
url: license.url,
},
origin,
...getContributorGroups(customFields),
};
};
20 changes: 10 additions & 10 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 1c8331f

Please sign in to comment.