Resolving aliased tag media.
This commit is contained in:
@@ -161,6 +161,7 @@ const tags = [
|
||||
name: 'ass to other girl\'s mouth',
|
||||
slug: 'atogm',
|
||||
description: '[Ass to mouth](/tag/atm) with a cock that has been in someone else\'s ass. ATOGM may also be the gay variation "ass to other guy\'s mouth".',
|
||||
implies: ['atm'],
|
||||
group: 'oral',
|
||||
},
|
||||
{
|
||||
@@ -322,6 +323,10 @@ const tags = [
|
||||
name: 'bondage',
|
||||
slug: 'bondage',
|
||||
},
|
||||
{
|
||||
name: 'bimbo',
|
||||
slug: 'bimbo',
|
||||
},
|
||||
{
|
||||
name: 'braces',
|
||||
slug: 'braces',
|
||||
@@ -557,6 +562,7 @@ const tags = [
|
||||
{
|
||||
name: 'fake tits',
|
||||
slug: 'fake-tits',
|
||||
description: 'Tasteful enhancements or massive bimbo bolt-ons, you don\'t mind a bit of plastic to get the boobs you\'ve always wanted.',
|
||||
rename: 'enhanced-boobs',
|
||||
},
|
||||
{
|
||||
@@ -844,13 +850,18 @@ const tags = [
|
||||
name: 'MFM threesome',
|
||||
slug: 'mfm',
|
||||
implies: ['threesome'],
|
||||
description: 'Two men fucking one woman, but not eachother. Typically involves a \'spitroast\', where one guy gets a blowjob and the other fucks her pussy or ass.',
|
||||
description: 'Two men fucking one woman, but not eachother. Typically involves a [spitroast](/tag/spitroast), where one guy gets a blowjob and the other fucks her pussy or ass.',
|
||||
group: 'group',
|
||||
},
|
||||
{
|
||||
name: 'spitroast',
|
||||
slug: 'spitroast',
|
||||
},
|
||||
{
|
||||
name: 'anal spitroast',
|
||||
slug: 'anal-spitroast',
|
||||
implies: ['anal', 'spitroast'],
|
||||
},
|
||||
{
|
||||
name: 'military',
|
||||
slug: 'military',
|
||||
@@ -3141,12 +3152,17 @@ exports.seed = (knex) => Promise.resolve()
|
||||
await Promise.all(tags.map((async (tag) => {
|
||||
if (tag.rename) {
|
||||
await knex('tags')
|
||||
.where('name', tag.name)
|
||||
.where((builder) => {
|
||||
builder
|
||||
.where('slug', tag.slug)
|
||||
.orWhere('name', tag.name);
|
||||
})
|
||||
.whereNotNull('alias_for')
|
||||
.delete();
|
||||
|
||||
await knex('tags')
|
||||
.where('slug', tag.rename)
|
||||
.whereNull('alias_for')
|
||||
.update({
|
||||
name: tag.name,
|
||||
slug: tag.slug,
|
||||
|
||||
@@ -1144,7 +1144,7 @@ exports.seed = (knex) => Promise.resolve()
|
||||
entity_id: entitiesBySlug[media.entitySlug]?.id,
|
||||
})), 'path', knex);
|
||||
|
||||
const tagIdsBySlug = tags.reduce((acc, tag) => ({ ...acc, [tag.slug]: tag.id }), {});
|
||||
const tagIdsBySlug = tags.reduce((acc, tag) => ({ ...acc, [tag.slug]: tag.alias_for || tag.id }), {});
|
||||
const mediaIdsByPath = inserted.concat(updated).reduce((acc, item) => ({ ...acc, [item.path]: item.id }), {});
|
||||
|
||||
const tagMediaBySlug = tagMedia.reduce((acc, tagPhoto) => ({
|
||||
|
||||
Reference in New Issue
Block a user