@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.cjs CHANGED
@@ -1743,7 +1743,11 @@ var B1ChurchProvider = class {
1743
1743
  if (depth === 3) {
1744
1744
  const ministryId = segments[1];
1745
1745
  const planTypeId = segments[2];
1746
- const plans = await fetchPlans(planTypeId, authData);
1746
+ const allPlans = await fetchPlans(planTypeId, authData);
1747
+ const yesterday = /* @__PURE__ */ new Date();
1748
+ yesterday.setDate(yesterday.getDate() - 1);
1749
+ yesterday.setHours(0, 0, 0, 0);
1750
+ const plans = allPlans.filter((p) => new Date(p.serviceDate).getTime() >= yesterday.getTime());
1747
1751
  plans.sort((a, b) => new Date(a.serviceDate).getTime() - new Date(b.serviceDate).getTime());
1748
1752
  const imageMap = await this.fetchPlanImages(plans, ministryId, authData);
1749
1753
  return plans.map((p) => {