feat: capture pastor name and phone from OrariMesse.it detail endpoint
Populate church.pastorName from detail.parroco and church.phone from detail.telefono during Pass 2 schedule import. Only updates when fields are present and non-empty. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -491,10 +491,14 @@ async function processSchedulesForDiocese(
|
||||
})),
|
||||
});
|
||||
|
||||
// Mark church as scraped
|
||||
// Update church metadata from detail (pastor, phone) if available
|
||||
const churchUpdateData: Record<string, unknown> = { lastScrapedAt: new Date() };
|
||||
if (detail.parroco) churchUpdateData.pastorName = detail.parroco;
|
||||
if (detail.telefono) churchUpdateData.phone = detail.telefono;
|
||||
|
||||
await tx.church.update({
|
||||
where: { id: dbId },
|
||||
data: { lastScrapedAt: new Date() },
|
||||
data: churchUpdateData,
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user