mirror of
https://github.com/PeWu/topola-viewer.git
synced 2026-03-14 11:33:47 +00:00
WikiTree: added photos
This commit is contained in:
@@ -40,6 +40,9 @@ interface Person {
|
|||||||
BirthDate: string;
|
BirthDate: string;
|
||||||
DeathDate: string;
|
DeathDate: string;
|
||||||
};
|
};
|
||||||
|
PhotoData?: {
|
||||||
|
path: string;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Sends a request to the WikiTree API. Returns the parsed response JSON. */
|
/** Sends a request to the WikiTree API. Returns the parsed response JSON. */
|
||||||
@@ -245,6 +248,9 @@ function convertPerson(person: Person): JsonIndi {
|
|||||||
);
|
);
|
||||||
indi.death = Object.assign({}, parsedDate, {place: person.DeathLocation});
|
indi.death = Object.assign({}, parsedDate, {place: person.DeathLocation});
|
||||||
}
|
}
|
||||||
|
if (person.PhotoData) {
|
||||||
|
indi.images = [{url: `https://wikitree.com${person.PhotoData.path}`}];
|
||||||
|
}
|
||||||
return indi;
|
return indi;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user