[claude] Phase 2 cleanup: route remaining fetch() through data/ modules (#421) #461
Reference in New Issue
Block a user
Delete Branch "claude/issue-421"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #421
Summary
Phase 2 data layer work was already merged in PR #460. This PR closes out the remaining fetch() violations in two modules that were missed:
modules/bookshelves.js— replaced two direct Gitea API fetch() calls (commits + merged PRs) with imports fromdata/gitea.js. AddedfetchMergedPRs()todata/gitea.js.modules/weather.js— replaced direct Open-Meteo fetch() withfetchWeatherData()fromdata/weather.js.The one remaining fetch() in
weather.js:runPortalHealthChecks()is ano-corsconnectivity probe (not data collection) — accepted exception consistent with the portal health check pattern.Data Integrity Audit
bookshelves.js)data/gitea.jsfetchNexusCommits()bookshelves.js)data/gitea.jsfetchMergedPRs()weather.js)data/weather.jsfetchWeatherData()Test Plan
node --check app.js— passes ✅fetch()outsidemodules/data/(except portal probe)Verification
node --check app.js✅modules/data/is the sole data access layer ✅