Compare commits

..

No commits in common. "8cdc794a3a8032297f66c79233fa92f5708b291d" and "b62ae00c54fe4c6cc2c03083a1170de574ddfe99" have entirely different histories.

5 changed files with 9 additions and 16 deletions

View File

@ -117,7 +117,9 @@ function curateEntity(entity, parent, releases) {
if (entity.parent || parent) curatedEntity.parent = curateEntity(entity.parent || parent);
if (releases) curatedEntity.releases = releases.map((release) => curateRelease(release));
curatedEntity.sceneTotal = entity.sceneTotal;
if (entity.connection) {
curatedEntity.sceneTotal = entity.connection.totalCount;
}
return curatedEntity;
}

View File

@ -62,10 +62,12 @@ function initEntitiesActions(store, router) {
independent
hasLogo
${campaignsFragment}
sceneTotal
children: childEntitiesConnection {
totalCount
}
connection: scenesConnection {
totalCount
}
}
}
${campaignsFragment}

View File

@ -1,11 +0,0 @@
exports.up = async (knex) => knex.raw(`
CREATE OR REPLACE FUNCTION entities_scene_total(entity entities) RETURNS integer AS $$
SELECT COUNT(id)
FROM releases
WHERE releases.entity_id = entity.id;
$$ LANGUAGE SQL STABLE;
`);
exports.down = async (knex) => knex.raw(`
DROP FUNCTION IF EXISTS entities_scene_total;
`);

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{
"name": "traxxx",
"version": "1.205.4",
"version": "1.205.3",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "traxxx",
"version": "1.205.4",
"version": "1.205.3",
"license": "ISC",
"dependencies": {
"@casl/ability": "^5.2.2",

View File

@ -1,6 +1,6 @@
{
"name": "traxxx",
"version": "1.205.4",
"version": "1.205.3",
"description": "All the latest porn releases in one place",
"main": "src/app.js",
"scripts": {