Compare commits
2 Commits
b62ae00c54
...
8cdc794a3a
Author | SHA1 | Date |
---|---|---|
|
8cdc794a3a | |
|
250618df8b |
|
@ -117,9 +117,7 @@ function curateEntity(entity, parent, releases) {
|
||||||
if (entity.parent || parent) curatedEntity.parent = curateEntity(entity.parent || parent);
|
if (entity.parent || parent) curatedEntity.parent = curateEntity(entity.parent || parent);
|
||||||
if (releases) curatedEntity.releases = releases.map((release) => curateRelease(release));
|
if (releases) curatedEntity.releases = releases.map((release) => curateRelease(release));
|
||||||
|
|
||||||
if (entity.connection) {
|
curatedEntity.sceneTotal = entity.sceneTotal;
|
||||||
curatedEntity.sceneTotal = entity.connection.totalCount;
|
|
||||||
}
|
|
||||||
|
|
||||||
return curatedEntity;
|
return curatedEntity;
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,12 +62,10 @@ function initEntitiesActions(store, router) {
|
||||||
independent
|
independent
|
||||||
hasLogo
|
hasLogo
|
||||||
${campaignsFragment}
|
${campaignsFragment}
|
||||||
|
sceneTotal
|
||||||
children: childEntitiesConnection {
|
children: childEntitiesConnection {
|
||||||
totalCount
|
totalCount
|
||||||
}
|
}
|
||||||
connection: scenesConnection {
|
|
||||||
totalCount
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
${campaignsFragment}
|
${campaignsFragment}
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
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;
|
||||||
|
`);
|
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "traxxx",
|
"name": "traxxx",
|
||||||
"version": "1.205.3",
|
"version": "1.205.4",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "traxxx",
|
"name": "traxxx",
|
||||||
"version": "1.205.3",
|
"version": "1.205.4",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@casl/ability": "^5.2.2",
|
"@casl/ability": "^5.2.2",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "traxxx",
|
"name": "traxxx",
|
||||||
"version": "1.205.3",
|
"version": "1.205.4",
|
||||||
"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": {
|
||||||
|
|
Loading…
Reference in New Issue