Compare commits

...

3 Commits

4 changed files with 7 additions and 5 deletions

4
package-lock.json generated
View File

@@ -1,11 +1,11 @@
{ {
"name": "traxxx-web", "name": "traxxx-web",
"version": "0.45.2", "version": "0.45.3",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"version": "0.45.2", "version": "0.45.3",
"dependencies": { "dependencies": {
"@brillout/json-serializer": "^0.5.8", "@brillout/json-serializer": "^0.5.8",
"@dicebear/collection": "^7.0.5", "@dicebear/collection": "^7.0.5",

View File

@@ -89,7 +89,7 @@
"overrides": { "overrides": {
"vite": "$vite" "vite": "$vite"
}, },
"version": "0.45.2", "version": "0.45.3",
"imports": { "imports": {
"#/*": "./*.js" "#/*": "./*.js"
} }

View File

@@ -38,6 +38,7 @@ export function getAffiliateSceneUrl(scene) {
scenePath: scene.affiliate.parameters.prefixSlash scenePath: scene.affiliate.parameters.prefixSlash
? scenePath ? scenePath
: scenePath.replace(/^\//, ''), : scenePath.replace(/^\//, ''),
entryId: scene.entryId,
}); });
} }
@@ -70,7 +71,7 @@ export function getAffiliateEntityUrl(entity) {
? entity.affiliate.parameters.replaceEntity.url ? entity.affiliate.parameters.replaceEntity.url
: entity.affiliate.url; : entity.affiliate.url;
if (entity.id === entity.affiliate.entityId) { if (entity.id === entity.affiliate.entityId || entity.url === entity.parent?.url) {
return affiliateUrl; return affiliateUrl;
} }
@@ -79,7 +80,7 @@ export function getAffiliateEntityUrl(entity) {
} }
// channel has its own domain // channel has its own domain
if (new URL(entity.url).pathname === '/') { if (new URL(entity.url).pathname === '/' && entity.url !== entity.parent?.url) {
return entity.url; return entity.url;
} }

View File

@@ -29,6 +29,7 @@ function curateScene(rawScene, assets, reqUser) {
title: rawScene.title, title: rawScene.title,
slug: rawScene.slug, slug: rawScene.slug,
url: rawScene.url, url: rawScene.url,
entryId: rawScene.entry_id,
date: rawScene.date, date: rawScene.date,
datePrecision: rawScene.date_precision, datePrecision: rawScene.date_precision,
createdAt: rawScene.created_at, createdAt: rawScene.created_at,