Compare commits
No commits in common. "1d686d7e407ce3a30d9b09e9140cb48452584e40" and "8967907893578b784a071e9ea7a9a63d09b2f4bc" have entirely different histories.
1d686d7e40
...
8967907893
|
@ -149,15 +149,8 @@ async function fetchEntity(scroll = true) {
|
||||||
|
|
||||||
this.pageTitle = entity.name;
|
this.pageTitle = entity.name;
|
||||||
|
|
||||||
const campaign = entity.campaigns.find(campaignX => !campaignX.banner)
|
const campaign = entity.campaigns.find(campaignX => !campaignX.banner);
|
||||||
|| entity.parent?.campaigns.find(campaignX => !campaignX.banner);
|
this.entityUrl = campaign?.url || campaign?.affiliate?.url || entity.url;
|
||||||
|
|
||||||
const affiliateParams = new URLSearchParams({
|
|
||||||
...(entity.url && Object.fromEntries(new URL(entity.url).searchParams)), // preserve any query in entity URL, e.g. ?siteId=5
|
|
||||||
...(campaign?.affiliate?.parameters && Object.fromEntries(new URLSearchParams(campaign.affiliate.parameters))), // append affiliate parameters
|
|
||||||
}).toString();
|
|
||||||
|
|
||||||
this.entityUrl = campaign?.url || campaign?.affiliate?.url || `${entity.url}${campaign?.affiliate?.parameters ? `?${affiliateParams}` : ''}`;
|
|
||||||
|
|
||||||
if (scroll && this.$refs.filter?.$el) {
|
if (scroll && this.$refs.filter?.$el) {
|
||||||
this.$refs.filter.$el.scrollIntoView();
|
this.$refs.filter.$el.scrollIntoView();
|
||||||
|
|
|
@ -122,7 +122,6 @@ const campaignsFragment = `
|
||||||
affiliate {
|
affiliate {
|
||||||
id
|
id
|
||||||
url
|
url
|
||||||
parameters
|
|
||||||
}
|
}
|
||||||
banner {
|
banner {
|
||||||
id
|
id
|
||||||
|
|
|
@ -1285,10 +1285,8 @@ exports.up = knex => Promise.resolve()
|
||||||
.inTable('entities');
|
.inTable('entities');
|
||||||
|
|
||||||
table.text('url');
|
table.text('url');
|
||||||
table.text('parameters');
|
|
||||||
|
|
||||||
table.unique(['entity_id', 'url']);
|
table.unique(['entity_id', 'url']);
|
||||||
table.unique(['entity_id', 'parameters']);
|
|
||||||
|
|
||||||
table.text('comment');
|
table.text('comment');
|
||||||
|
|
||||||
|
@ -1580,12 +1578,6 @@ exports.up = knex => Promise.resolve()
|
||||||
CREATE FUNCTION banners_ratio(banner banners) RETURNS numeric AS $$
|
CREATE FUNCTION banners_ratio(banner banners) RETURNS numeric AS $$
|
||||||
SELECT ROUND(banner.width::decimal / banner.height::decimal, 2);
|
SELECT ROUND(banner.width::decimal / banner.height::decimal, 2);
|
||||||
$$ LANGUAGE SQL STABLE;
|
$$ LANGUAGE SQL STABLE;
|
||||||
|
|
||||||
CREATE FUNCTION get_random_campaign() RETURNS SETOF campaigns AS $$
|
|
||||||
SELECT * FROM campaigns
|
|
||||||
ORDER BY random()
|
|
||||||
LIMIT 1;
|
|
||||||
$$ LANGUAGE sql STABLE;
|
|
||||||
`);
|
`);
|
||||||
})
|
})
|
||||||
// POLICIES
|
// POLICIES
|
||||||
|
@ -1832,7 +1824,6 @@ exports.down = (knex) => { // eslint-disable-line arrow-body-style
|
||||||
DROP POLICY IF EXISTS stashes_policy ON stashes_actors;
|
DROP POLICY IF EXISTS stashes_policy ON stashes_actors;
|
||||||
|
|
||||||
DROP FUNCTION IF EXISTS current_user_id;
|
DROP FUNCTION IF EXISTS current_user_id;
|
||||||
DROP FUNCTION IF EXISTS get_random_campaign;
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS releases_search_results;
|
DROP TABLE IF EXISTS releases_search_results;
|
||||||
`);
|
`);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "traxxx",
|
"name": "traxxx",
|
||||||
"version": "1.196.6",
|
"version": "1.196.5",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "traxxx",
|
"name": "traxxx",
|
||||||
"version": "1.196.6",
|
"version": "1.196.5",
|
||||||
"description": "All the latest porn releases in one place",
|
"description": "All the latest porn releases in one place",
|
||||||
"main": "src/app.js",
|
"main": "src/app.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 32 KiB |
Binary file not shown.
Before Width: | Height: | Size: 14 KiB |
|
@ -7,12 +7,6 @@ const affiliates = [
|
||||||
url: 'https://join.archangelvideo.com/track/MzQ3LjEuMS4xLjAuMC4wLjAuMA',
|
url: 'https://join.archangelvideo.com/track/MzQ3LjEuMS4xLjAuMC4wLjAuMA',
|
||||||
comment: 'revshare',
|
comment: 'revshare',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
id: 'kink_params',
|
|
||||||
network: 'kink',
|
|
||||||
parameters: 't=eyJhZmZpbGlhdGUiOiJEZWJhdWNoZXJ5TGliIiwiY2FtcGFpZ24iOiJkZWZhdWx0IiwiYWdldmVyaWZpZWQiOiJ5In0',
|
|
||||||
comment: '50%',
|
|
||||||
},
|
|
||||||
];
|
];
|
||||||
|
|
||||||
const banners = [
|
const banners = [
|
||||||
|
@ -471,7 +465,7 @@ const campaigns = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
network: 'kink',
|
network: 'kink',
|
||||||
affiliate: 'kink_params',
|
url: 'https://www.kink.com/shoots/latest?t=eyJhZmZpbGlhdGUiOiJEZWJhdWNoZXJ5TGliIiwiY2FtcGFpZ24iOiJkZWZhdWx0IiwiYWdldmVyaWZpZWQiOiJ5In0',
|
||||||
comment: '50%',
|
comment: '50%',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -679,7 +673,6 @@ exports.seed = async knex => Promise.resolve()
|
||||||
id: affiliate.id,
|
id: affiliate.id,
|
||||||
entity_id: networksBySlug[affiliate.network]?.id || channelsBySlug[affiliate.channel]?.id || null,
|
entity_id: networksBySlug[affiliate.network]?.id || channelsBySlug[affiliate.channel]?.id || null,
|
||||||
url: affiliate.url,
|
url: affiliate.url,
|
||||||
parameters: affiliate.parameters,
|
|
||||||
comment: affiliate.comment,
|
comment: affiliate.comment,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue