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
This commit is contained in:
@@ -15,6 +15,13 @@
|
||||
"when": 1794941123648,
|
||||
"tag": "0001_fluffy_vivisector",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 2,
|
||||
"version": "7",
|
||||
"when": 1794959606685,
|
||||
"tag": "0002_fearless_doctor_spectrum",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user