forked from DebaucheryLibrarian/traxxx
Added Top Web Models update and scene scraper.
This commit is contained in:
@@ -32,6 +32,19 @@ function curateEntity(entity, includeParameters = false) {
|
||||
parent: curateEntity(entity.parent, includeParameters),
|
||||
} : {};
|
||||
|
||||
if (entity.tags) {
|
||||
curatedEntity.tags = entity.tags.map(tag => ({
|
||||
id: tag.id,
|
||||
name: tag.name,
|
||||
slug: tag.slug,
|
||||
priority: tag.priority,
|
||||
}));
|
||||
}
|
||||
|
||||
if (includeParameters) {
|
||||
curatedEntity.parameters = entity.parameters;
|
||||
}
|
||||
|
||||
if (entity.children) {
|
||||
curatedEntity.children = entity.children.map(child => curateEntity({
|
||||
...child,
|
||||
@@ -46,19 +59,6 @@ function curateEntity(entity, includeParameters = false) {
|
||||
}, includeParameters));
|
||||
}
|
||||
|
||||
if (entity.tags) {
|
||||
curatedEntity.tags = entity.tags.map(tag => ({
|
||||
id: tag.id,
|
||||
name: tag.name,
|
||||
slug: tag.slug,
|
||||
priority: tag.priority,
|
||||
}));
|
||||
}
|
||||
|
||||
if (includeParameters) {
|
||||
curatedEntity.parameters = entity.parameters;
|
||||
}
|
||||
|
||||
return curatedEntity;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user