Closed lukevella closed 2 weeks ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
app | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Oct 31, 2024 10:01pm |
The changes in this pull request primarily involve modifications to the polls.ts
file, focusing on the implementation of a soft delete strategy for polls and participants. The deleted
field has been replaced with deletedAt: null
in various query methods to ensure that only active polls are considered. Additionally, the methods list
and paginatedList
have been removed, simplifying the router's functionality. These adjustments aim to enhance the clarity and maintainability of the code related to poll management.
File | Change Summary |
---|---|
apps/web/src/trpc/routers/polls.ts | - Replaced deleted field with deletedAt: null in queries.- Removed list method.- Removed paginatedList method.- Updated infiniteList to filter out deleted participants. |
Objective | Addressed | Explanation |
---|---|---|
Correctly count active participants excluding deleted ones (1419) | ✅ |
polls.ts
file to enhance query logic for retrieving polls by filtering out deleted polls.In the fields where the polls do play,
Softly deleted, they fade away.
Participants now count just right,
Hopping along, all feels so bright!
With each query, clarity's found,
In the rabbit's world, joy does abound! 🐇✨
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?
Fixes #1419
Summary by CodeRabbit
New Features
Bug Fixes
infiniteList
query.Refactor
list
andpaginatedList
methods to streamline poll retrieval functionality.