Skip to content

feat: add learner preference API#103

Merged
3m1n3nc3 merged 2 commits into
learnault:mainfrom
CmxTop:feat/86-learner-preference-api
Jul 20, 2026
Merged

feat: add learner preference API#103
3m1n3nc3 merged 2 commits into
learnault:mainfrom
CmxTop:feat/86-learner-preference-api

Conversation

@CmxTop

@CmxTop CmxTop commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Add a LearnerPreference model (locale, timezone, low-data mode, accessibility, content, and privacy settings) with deterministic defaults, plus GET/PATCH /users/me/preferences endpoints. Notification preferences remain owned by NotificationPreference so there is a single authority per preference. Privacy-impacting changes are recorded in a PreferenceAuditLog. Validation rejects unknown fields, invalid locale/timezone/enum values, and partial updates preserve omitted fields via an atomic upsert.

closes #86

Add a LearnerPreference model (locale, timezone, low-data mode,
accessibility, content, and privacy settings) with deterministic
defaults, plus GET/PATCH /users/me/preferences endpoints. Notification
preferences remain owned by NotificationPreference so there is a
single authority per preference. Privacy-impacting changes are
recorded in a PreferenceAuditLog. Validation rejects unknown fields,
invalid locale/timezone/enum values, and partial updates preserve
omitted fields via an atomic upsert.

closes learnault#86
@3m1n3nc3

Copy link
Copy Markdown
Contributor

Please resolve the conflicts

Keep both LearnerPreference/PreferenceAuditLog (learner preference API)
and Session/AuditLog (from main) additions to the User model and schema.
@CmxTop

CmxTop commented Jul 20, 2026

Copy link
Copy Markdown
Contributor Author

conflict resolved

@3m1n3nc3
3m1n3nc3 merged commit 50644b2 into learnault:main Jul 20, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: Add Learner Preference API

2 participants