Don't fetch actor assets for scene and movie aggregations.
This commit is contained in:
@@ -271,12 +271,15 @@ export async function fetchActorsById(actorIds, options = {}, reqUser) {
|
||||
.where('user_id', reqUser.id)
|
||||
.whereIn('actor_id', actorIds)
|
||||
: [],
|
||||
]);
|
||||
].slice(0, options.shallow ? 1 : -1));
|
||||
|
||||
if (options.order) {
|
||||
return actors.map((actorEntry) => curateActor(actorEntry, {
|
||||
stashes: stashes.filter((stash) => stash.actor_id === actorEntry.id),
|
||||
alerts: alerts.filter((alert) => alert.actor_id === actorEntry.id),
|
||||
stashes: stashes?.filter((stash) => stash.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,
|
||||
}));
|
||||
}
|
||||
@@ -290,11 +293,11 @@ export async function fetchActorsById(actorIds, options = {}, reqUser) {
|
||||
}
|
||||
|
||||
return curateActor(actor, {
|
||||
stashes: stashes.filter((stash) => stash.actor_id === actor.id),
|
||||
alerts: alerts.filter((alert) => alert.actor_id === actor.id),
|
||||
profiles: profiles.filter((profile) => profile.actor_id === actor.id),
|
||||
photos: photos.filter((photo) => photo.actor_id === actor.id),
|
||||
socials: socials.filter((social) => social.actor_id === actor.id),
|
||||
stashes: stashes?.filter((stash) => stash.actor_id === actor.id),
|
||||
alerts: alerts?.filter((alert) => alert.actor_id === actor.id),
|
||||
profiles: profiles?.filter((profile) => profile.actor_id === actor.id),
|
||||
photos: photos?.filter((photo) => photo.actor_id === actor.id),
|
||||
socials: socials?.filter((social) => social.actor_id === actor.id),
|
||||
append: options.append,
|
||||
});
|
||||
}).filter(Boolean);
|
||||
|
||||
Reference in New Issue
Block a user