feat: make compute stats more robust by excluding pages with title "Famile de resistant"
parent
645280f863
commit
5488d90b62
|
@ -34,12 +34,14 @@ export async function fetchFamiliesWithEventsFromNotion(
|
||||||
return buildFamilyEvent(pageObjectResponse);
|
return buildFamilyEvent(pageObjectResponse);
|
||||||
});
|
});
|
||||||
|
|
||||||
const families: Famille[] = await Promise.all(
|
const familles: Famille[] = await Promise.all(
|
||||||
familyPages.map((pageObjectResponse) => {
|
familyPages.map((pageObjectResponse) => {
|
||||||
return buildFamily(pageObjectResponse, familyEvents);
|
return buildFamily(pageObjectResponse, familyEvents);
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
return families;
|
// Fix to remove the empty "Famille de résistant" page that is often created by mistake
|
||||||
|
const filtered = familles.filter(f => f.Titre !== "Famille de résistant");
|
||||||
|
return filtered;
|
||||||
}
|
}
|
||||||
|
|
||||||
function buildFamilyEvent(page: PageObjectResponse): EvenementFamille {
|
function buildFamilyEvent(page: PageObjectResponse): EvenementFamille {
|
||||||
|
|
Loading…
Reference in New Issue