mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-11 22:02:16 +00:00
refactor(gamification): extract achievements builder out of the route
Move the day-series, completion-date, and streak helpers plus buildAchievementsResult and the hidden-card spoiler shields into src/lib/gamification/achievements-result.ts (verbatim). The route drops from 1247 to 136 LOC and is now auth -> module gate -> cached -> idempotent unlock-persistence -> apiSuccess (web + iOS format). No behaviour change: the aggregation moved as-is, the cached factory contract and the off-cache pendingUnlocks persistence are unchanged.
This commit is contained in:
1 parent
9bd46ff25d
commit
03034339d6
2 files changed
+1137
-1116