mirror of
https://github.com/PeWu/topola-viewer.git
synced 2026-03-02 05:36:35 +00:00
WikiTree: added photos
This commit is contained in:
@@ -40,6 +40,9 @@ interface Person {
|
||||
BirthDate: string;
|
||||
DeathDate: string;
|
||||
};
|
||||
PhotoData?: {
|
||||
path: string;
|
||||
};
|
||||
}
|
||||
|
||||
/** 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});
|
||||
}
|
||||
if (person.PhotoData) {
|
||||
indi.images = [{url: `https://wikitree.com${person.PhotoData.path}`}];
|
||||
}
|
||||
return indi;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user