Moved Dogfart to DFXtra.
This commit is contained in:
@@ -68,6 +68,13 @@ const parentNetworks = [
|
||||
concurrency: 1,
|
||||
},
|
||||
},
|
||||
{
|
||||
slug: 'dfxtra',
|
||||
name: 'DFXtra',
|
||||
alias: ['dfextra'],
|
||||
url: 'https://dfxtra.com',
|
||||
parent: 'gamma',
|
||||
},
|
||||
];
|
||||
|
||||
const networks = [
|
||||
@@ -249,6 +256,10 @@ const networks = [
|
||||
name: 'Dogfart Network',
|
||||
url: 'https://dogfartnetwork.com',
|
||||
description: 'The world famous Dogfart Interracial series. Online since 1996, we have the largest collection of Interracial videos, pictures and content on the web.',
|
||||
parent: 'dfxtra',
|
||||
parameters: {
|
||||
layout: 'api',
|
||||
},
|
||||
},
|
||||
{
|
||||
slug: 'fabulouscash',
|
||||
@@ -676,6 +687,19 @@ const networks = [
|
||||
|
||||
exports.seed = (knex) => Promise.resolve()
|
||||
.then(async () => {
|
||||
await Promise.all([].concat(grandParentNetworks, parentNetworks, networks).map(async (network) => {
|
||||
if (network.rename) {
|
||||
return knex('entities')
|
||||
.where({
|
||||
type: network.type || 'network',
|
||||
slug: network.rename,
|
||||
})
|
||||
.update('slug', network.slug);
|
||||
}
|
||||
|
||||
return null;
|
||||
}).filter(Boolean));
|
||||
|
||||
const grandParentNetworkEntries = await upsert('entities', grandParentNetworks.map((network) => ({ ...network, type: 'network' })), ['slug', 'type'], knex);
|
||||
const grandParentNetworksBySlug = [].concat(grandParentNetworkEntries.inserted, grandParentNetworkEntries.updated).reduce((acc, network) => ({ ...acc, [network.slug]: network.id }), {});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user