Commit Graph

1 Commits

Author SHA1 Message Date
Tiel Coder 26b31978e2 B2: profile + notification_preferences + SMS consent capture (TCPA)
- notification_preferences table (user_id PK->users, email/sms toggles,
  sms_consent_at/source/ip evidence, quiet hours, digest) + migration 0002
- src/domain/consent.ts: pure TCPA rule (phoneChanged/buildConsent/resetConsent)
- src/db/profile.ts: updateProfile (partial update; resets consent on phone
  change) + setSmsConsent (opt-in) + getProfile
- PATCH/POST /api/dev/profile routes
- seed: per-user prefs row (email on, SMS off)
- 6 unit tests named after the rules
2026-11-18 00:09:05 +00:00