Compare commits
2 Commits
9cc4b21b76
...
074b5a4ae4
| Author | SHA1 | Date | |
|---|---|---|---|
| 074b5a4ae4 | |||
| e1e83994e0 |
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,11 +1,11 @@
|
|||||||
{
|
{
|
||||||
"name": "traxxx-web",
|
"name": "traxxx-web",
|
||||||
"version": "0.46.18",
|
"version": "0.46.19",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"version": "0.46.18",
|
"version": "0.46.19",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@brillout/json-serializer": "^0.5.8",
|
"@brillout/json-serializer": "^0.5.8",
|
||||||
"@dicebear/collection": "^7.0.5",
|
"@dicebear/collection": "^7.0.5",
|
||||||
|
|||||||
@@ -92,7 +92,7 @@
|
|||||||
"overrides": {
|
"overrides": {
|
||||||
"vite": "$vite"
|
"vite": "$vite"
|
||||||
},
|
},
|
||||||
"version": "0.46.18",
|
"version": "0.46.19",
|
||||||
"imports": {
|
"imports": {
|
||||||
"#/*": "./*.js"
|
"#/*": "./*.js"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -271,12 +271,15 @@ export async function fetchActorsById(actorIds, options = {}, reqUser) {
|
|||||||
.where('user_id', reqUser.id)
|
.where('user_id', reqUser.id)
|
||||||
.whereIn('actor_id', actorIds)
|
.whereIn('actor_id', actorIds)
|
||||||
: [],
|
: [],
|
||||||
]);
|
].slice(0, options.shallow ? 1 : -1));
|
||||||
|
|
||||||
if (options.order) {
|
if (options.order) {
|
||||||
return actors.map((actorEntry) => curateActor(actorEntry, {
|
return actors.map((actorEntry) => curateActor(actorEntry, {
|
||||||
stashes: stashes.filter((stash) => stash.actor_id === actorEntry.id),
|
stashes: stashes?.filter((stash) => stash.actor_id === actorEntry.id),
|
||||||
alerts: alerts.filter((alert) => alert.actor_id === actorEntry.id),
|
alerts: alerts?.filter((alert) => alert.actor_id === actorEntry.id),
|
||||||
|
profiles: profiles?.filter((profile) => profile.actor_id === actorEntry.id),
|
||||||
|
photos: photos?.filter((photo) => photo.actor_id === actorEntry.id),
|
||||||
|
socials: socials?.filter((social) => social.actor_id === actorEntry.id),
|
||||||
append: options.append,
|
append: options.append,
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
@@ -290,11 +293,11 @@ export async function fetchActorsById(actorIds, options = {}, reqUser) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return curateActor(actor, {
|
return curateActor(actor, {
|
||||||
stashes: stashes.filter((stash) => stash.actor_id === actor.id),
|
stashes: stashes?.filter((stash) => stash.actor_id === actor.id),
|
||||||
alerts: alerts.filter((alert) => alert.actor_id === actor.id),
|
alerts: alerts?.filter((alert) => alert.actor_id === actor.id),
|
||||||
profiles: profiles.filter((profile) => profile.actor_id === actor.id),
|
profiles: profiles?.filter((profile) => profile.actor_id === actor.id),
|
||||||
photos: photos.filter((photo) => photo.actor_id === actor.id),
|
photos: photos?.filter((photo) => photo.actor_id === actor.id),
|
||||||
socials: socials.filter((social) => social.actor_id === actor.id),
|
socials: socials?.filter((social) => social.actor_id === actor.id),
|
||||||
append: options.append,
|
append: options.append,
|
||||||
});
|
});
|
||||||
}).filter(Boolean);
|
}).filter(Boolean);
|
||||||
|
|||||||
@@ -421,7 +421,7 @@ export async function fetchMovies(filters, rawOptions, reqUser, context) {
|
|||||||
const channelCounts = options.aggregateChannels && countAggregations(result.aggregations?.channelIds);
|
const channelCounts = options.aggregateChannels && countAggregations(result.aggregations?.channelIds);
|
||||||
|
|
||||||
const [aggActors, aggTags, aggChannels] = await Promise.all([
|
const [aggActors, aggTags, aggChannels] = await Promise.all([
|
||||||
options.aggregateActors ? fetchActorsById(result.aggregations.actorIds.map((bucket) => bucket.key), { order: ['slug', 'asc'], append: actorCounts }, reqUser) : [],
|
options.aggregateActors ? fetchActorsById(result.aggregations.actorIds.map((bucket) => bucket.key), { shadllow: true, order: ['slug', 'asc'], append: actorCounts }, reqUser) : [],
|
||||||
options.aggregateTags ? fetchTagsById(result.aggregations.tagIds.map((bucket) => bucket.key), { order: [knex.raw('lower(name)'), 'asc'], append: tagCounts }, reqUser, context) : [],
|
options.aggregateTags ? fetchTagsById(result.aggregations.tagIds.map((bucket) => bucket.key), { order: [knex.raw('lower(name)'), 'asc'], append: tagCounts }, reqUser, context) : [],
|
||||||
options.aggregateChannels ? fetchEntitiesById(result.aggregations.channelIds.map((bucket) => bucket.key), { order: ['slug', 'asc'], append: channelCounts }, reqUser, context) : [],
|
options.aggregateChannels ? fetchEntitiesById(result.aggregations.channelIds.map((bucket) => bucket.key), { order: ['slug', 'asc'], append: channelCounts }, reqUser, context) : [],
|
||||||
]);
|
]);
|
||||||
|
|||||||
@@ -649,7 +649,7 @@ export async function fetchScenes(filters, rawOptions, reqUser, context) {
|
|||||||
console.time('fetch aggregations');
|
console.time('fetch aggregations');
|
||||||
|
|
||||||
const [aggActors, aggTags, aggChannels] = await Promise.all([
|
const [aggActors, aggTags, aggChannels] = await Promise.all([
|
||||||
options.aggregateActors ? fetchActorsById(result.aggregations.actorIds.map((bucket) => bucket.key), { order: ['slug', 'asc'], append: actorCounts }, reqUser) : [],
|
options.aggregateActors ? fetchActorsById(result.aggregations.actorIds.map((bucket) => bucket.key), { shallow: true, order: ['slug', 'asc'], append: actorCounts }, reqUser) : [],
|
||||||
options.aggregateTags ? fetchTagsById(result.aggregations.tagIds.map((bucket) => bucket.key), { order: [knex.raw('lower(name)'), 'asc'], append: tagCounts }, reqUser, context) : [],
|
options.aggregateTags ? fetchTagsById(result.aggregations.tagIds.map((bucket) => bucket.key), { order: [knex.raw('lower(name)'), 'asc'], append: tagCounts }, reqUser, context) : [],
|
||||||
options.aggregateChannels ? fetchEntitiesById(entityIds.map((bucket) => bucket.key), { order: ['slug', 'asc'], append: channelCounts }, reqUser, context) : [],
|
options.aggregateChannels ? fetchEntitiesById(entityIds.map((bucket) => bucket.key), { order: ['slug', 'asc'], append: channelCounts }, reqUser, context) : [],
|
||||||
]);
|
]);
|
||||||
|
|||||||
Reference in New Issue
Block a user