Added basic co-star actor filter to actor page.
This commit is contained in:
@@ -360,6 +360,27 @@ function getIncludedEntities(router) {
|
||||
];
|
||||
}
|
||||
|
||||
function getIncludedActors(router) {
|
||||
const includedActors = router.currentRoute.query.actors ? router.currentRoute.query.actors.split(',') : [];
|
||||
|
||||
if (includedActors.length === 0) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return [
|
||||
{
|
||||
releasesActorsConnection: {
|
||||
some: {
|
||||
actor: {
|
||||
slug: {
|
||||
in: includedActors,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
export {
|
||||
releaseActorsFragment,
|
||||
@@ -373,4 +394,5 @@ export {
|
||||
siteFragment,
|
||||
sitesFragment,
|
||||
getIncludedEntities,
|
||||
getIncludedActors,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user