Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement backend functionality for newsletter subscription and unsub…
…scription - Added the ability to subscribe users to the newsletter, ensuring that email validation is performed. - Implemented logic to handle resubscription for users who previously unsubscribed, generating a new unsubscribe token for them. - Established an unsubscribe process that sets the subscriber's status to inactive while retaining the record in the database. - Enhanced the database model to include an active status flag, which is updated based on subscription actions. - Included comprehensive error handling for scenarios such as invalid email formats and expired tokens during unsubscribe requests. - Updated the controller to handle subscription and unsubscription requests effectively, providing clear responses to the client. These enhancements improve the overall user experience by providing seamless management of newsletter subscriptions.
- Loading branch information