Added WP boob filter to actors page.

This commit is contained in:
DebaucheryLibrarian
2021-02-28 03:38:54 +01:00
parent 46a3906bde
commit eca24a7c65
10 changed files with 504 additions and 45 deletions

View File

@@ -266,11 +266,16 @@ function initActorActions(store, router) {
pageNumber = 1,
letter,
gender,
naturalBoobs,
}) {
const genderFilter = (gender === null && 'gender: { isNull: true }')
|| (gender === 'all' && ' ')
|| `gender: { equalTo: "${gender}" }`;
const naturalBoobsFilter = (naturalBoobs && 'naturalBoobs: { equalTo: true }')
|| (naturalBoobs === false && 'naturalBoobs: { equalTo: false }')
|| '';
const { connection: { actors, totalCount } } = await graphql(`
query Actors(
$limit: Int,
@@ -289,6 +294,7 @@ function initActorActions(store, router) {
startsWith: $letter
}
${genderFilter}
${naturalBoobsFilter}
}
) {
totalCount
@@ -342,6 +348,7 @@ function initActorActions(store, router) {
offset: Math.max(0, (pageNumber - 1)) * limit,
limit,
letter,
naturalBoobs,
});
return {