Closed lukevella closed 1 month ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
app | 🔄 Building (Inspect) | Visit Preview | 💬 Add feedback | Oct 20, 2024 8:58am |
landing | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Oct 20, 2024 8:58am |
The changes in this pull request primarily focus on the delete
mutation within the user
router located in apps/web/src/trpc/routers/user.ts
. The modifications restructure the order of database operations within a transaction, specifically changing the sequence of deleting votes and comments associated with users. Votes are now deleted before comments, and the logic for deleting comments has been expanded to include those made by the user. The overall transaction structure remains the same, with no changes to public or exported entity signatures.
File Path | Change Summary |
---|---|
apps/web/src/trpc/routers/user.ts | - Restructured deletion process: votes are now deleted before comments. - Updated deletion logic for comments to include user-specific comments. - Removed and replaced await tx.vote.deleteMany call to reflect new order of operations. |
🐇 In the code where rabbits play,
Votes are gone before the fray.
Comments follow, neat and clear,
A tidy process, never fear!
With each change, we hop with glee,
For better data harmony! 🌟
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
We need to delete votes first before we can delete options.
Summary by CodeRabbit