forked from DebaucheryLibrarian/traxxx
Replaced default height and weight fields with fields taking units argument.
This commit is contained in:
@@ -4,8 +4,23 @@ function curateActor(actor) {
|
||||
const curatedActor = {
|
||||
...actor,
|
||||
avatar: actor.avatar[0],
|
||||
origin: {
|
||||
country: actor.originCountry,
|
||||
height: actor.heightMetric && {
|
||||
metric: actor.heightMetric,
|
||||
imperial: actor.heightImperial,
|
||||
},
|
||||
weight: actor.weightMetric && {
|
||||
metric: actor.weightMetric,
|
||||
imperial: actor.weightImperial,
|
||||
},
|
||||
origin: actor.birthCountry && {
|
||||
city: actor.birthCity,
|
||||
state: actor.birthState,
|
||||
country: actor.birthCountry,
|
||||
},
|
||||
residence: actor.residenceCountry && {
|
||||
city: actor.residenceCity,
|
||||
state: actor.residenceState,
|
||||
country: actor.residenceCountry,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -20,14 +35,50 @@ function initActorActions(store, _router) {
|
||||
id
|
||||
name
|
||||
slug
|
||||
gender
|
||||
birthdate
|
||||
age
|
||||
ethnicity
|
||||
bust
|
||||
waist
|
||||
hip
|
||||
heightMetric: height(units:METRIC)
|
||||
heightImperial: height(units:IMPERIAL)
|
||||
weightMetric: weight(units:METRIC)
|
||||
weightImperial: weight(units:IMPERIAL)
|
||||
hasTattoos
|
||||
hasPiercings
|
||||
tattoos
|
||||
piercings
|
||||
avatar: actorsMediasByTargetId(condition: { role:"avatar" }) {
|
||||
thumbnail
|
||||
path
|
||||
}
|
||||
originCountry: countryByBirthCountryAlpha2 {
|
||||
photos: actorsMediasByTargetId(condition: { role:"photo" }) {
|
||||
id
|
||||
thumbnail
|
||||
path
|
||||
index
|
||||
}
|
||||
birthCity
|
||||
birthState
|
||||
birthCountry: countryByBirthCountryAlpha2 {
|
||||
alpha2
|
||||
name
|
||||
alias
|
||||
}
|
||||
residenceCity
|
||||
residenceState
|
||||
residenceCountry: countryByResidenceCountryAlpha2 {
|
||||
alpha2
|
||||
name
|
||||
alias
|
||||
}
|
||||
social: actorsSocialsByTargetId {
|
||||
id
|
||||
url
|
||||
platform
|
||||
}
|
||||
aliases: actorsByAliasFor {
|
||||
id
|
||||
name
|
||||
@@ -56,7 +107,7 @@ function initActorActions(store, _router) {
|
||||
avatar: actorsMediasByTargetId(condition: { role:"avatar" }) {
|
||||
thumbnail
|
||||
}
|
||||
originCountry: countryByBirthCountryAlpha2 {
|
||||
birthCountry: countryByBirthCountryAlpha2 {
|
||||
alpha2
|
||||
name
|
||||
alias
|
||||
@@ -67,8 +118,6 @@ function initActorActions(store, _router) {
|
||||
limit,
|
||||
});
|
||||
|
||||
console.log(actors);
|
||||
|
||||
return actors.map(actor => curateActor(actor));
|
||||
}
|
||||
|
||||
|
||||
@@ -47,6 +47,7 @@ function initReleasesActions(_store, _router) {
|
||||
name
|
||||
slug
|
||||
birthdate
|
||||
age
|
||||
originCountry: countryByBirthCountryAlpha2 {
|
||||
alpha2
|
||||
name
|
||||
@@ -111,6 +112,7 @@ function initReleasesActions(_store, _router) {
|
||||
name
|
||||
slug
|
||||
birthdate
|
||||
age
|
||||
originCountry: countryByBirthCountryAlpha2 {
|
||||
alpha2
|
||||
name
|
||||
|
||||
Reference in New Issue
Block a user