@churchapps/content-providers 0.1.11 → 0.1.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1687,7 +1687,11 @@ var B1ChurchProvider = class {
1687
1687
  if (depth === 3) {
1688
1688
  const ministryId = segments[1];
1689
1689
  const planTypeId = segments[2];
1690
- const plans = await fetchPlans(planTypeId, authData);
1690
+ const allPlans = await fetchPlans(planTypeId, authData);
1691
+ const yesterday = /* @__PURE__ */ new Date();
1692
+ yesterday.setDate(yesterday.getDate() - 1);
1693
+ yesterday.setHours(0, 0, 0, 0);
1694
+ const plans = allPlans.filter((p) => new Date(p.serviceDate).getTime() >= yesterday.getTime());
1691
1695
  plans.sort((a, b) => new Date(a.serviceDate).getTime() - new Date(b.serviceDate).getTime());
1692
1696
  const imageMap = await this.fetchPlanImages(plans, ministryId, authData);
1693
1697
  return plans.map((p) => {