-
Notifications
You must be signed in to change notification settings - Fork 0
Update subscriptions #272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update subscriptions #272
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors the subscription system from an email-based model to a user-based model. Instead of storing email addresses directly in subscription lists, subscriptions are now linked to user IDs with a foreign key relationship to the authInfo table.
- Subscription data model changed from storing arrays of emails to individual user-mailing list records
- API endpoints updated to handle user-based subscriptions with proper authorization checks
- New endpoints added for user subscription management and unsubscription functionality
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/services/subscription/subscription-schema.ts | Updates Zod validators and Mongoose schema to use userId instead of email arrays |
| src/services/subscription/subscription-router.ts | Refactors all endpoints to work with user-based subscriptions and adds new user management endpoints |
| src/services/subscription/subscription-router.test.ts | Updates all tests to use userId-based subscriptions and adds tests for new endpoints |
| src/database.types.ts | Updates TypeScript types to reflect new subscription table structure |
| docker/init-scripts/01-schema.sql | Modifies database schema to use userId with foreign key constraint and composite primary key |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Timothy-Gonzalez
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Several syntax issues but @anandani4136 said this was tested & we'll fix later, good for prod since we need it now
No description provided.