Skip to content

Comments

Feat/notification preferences#163

Merged
aji70 merged 4 commits intoMyFanss:mainfrom
yahia008:feat/notification-preferences
Feb 22, 2026
Merged

Feat/notification preferences#163
aji70 merged 4 commits intoMyFanss:mainfrom
yahia008:feat/notification-preferences

Conversation

@yahia008
Copy link
Contributor

PR Title

Add Notification Preferences to User Entity and Endpoints

Description

Closes #50

This PR implements notification preferences for users, allowing them to control how they receive communications from the platform. It includes database updates, validation, and secured endpoints to update and retrieve preferences.

Changes Made
1️⃣ Database Updates

Added notification preference fields to the User entity:

email_notifications → boolean (default: true)

push_notifications → boolean (default: false)

marketing_emails → boolean (default: false)

Defaults are applied automatically for new users.

2️⃣ Endpoints

PATCH /users/me/notifications

Updates notification preferences for the currently authenticated user

Accepts partial updates

Validates boolean values

GET /users/me

Returns user profile including notification preferences

3️⃣ Validation

All fields validated as booleans

Partial updates supported

Unauthorized access blocked

Acceptance Criteria ✅

✔ User can update notification preferences

✔ Preferences persist in the database

✔ Preferences returned in /users/me

✔ Default values applied for new users

@yahia008
Copy link
Contributor Author

hello @aji70
bug fixed

@aji70 aji70 merged commit 2114959 into MyFanss:main Feb 22, 2026
3 checks 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.

Add notification preferences

2 participants