-
Notifications
You must be signed in to change notification settings - Fork 7
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
#2770-getUserTasks #2833
base: feature/homepage-redesign
Are you sure you want to change the base?
#2770-getUserTasks #2833
Conversation
There might be a more efficient way to query the assigned tasks. Right now you have it going through all the tasks and then finding the assignees from there. However it might be more efficient to go through the user (there is an assignedTasks field on the User object) |
const requestedUser = await prisma.user.findUnique({ where: { userId } }); | ||
if (!requestedUser) throw new NotFoundException('User', userId); | ||
|
||
const tasks = prisma.task.findMany({ |
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.
We can find the user then get assigned tasks from there. Though this might be trivial in reality and if this works then we can keep it as is. What are your thoughts?
…astern-Electric-Racing/FinishLine into #2770-CaioDaSilva-getUserTasks
Changes
Added an endpoint to get all of a user's tasks.
Screenshots
Checklist
It can be helpful to check the
Checks
andFiles changed
tabs.Please review the contributor guide and reach out to your Tech Lead if anything is unclear.
Please request reviewers and ping on slack only after you've gone through this whole checklist.
yarn.lock
changes (unless dependencies have changed)Closes #2770