WIP: Feat: Match request entity - #1401
Draft
JeangelLF wants to merge 9 commits into
Draft
Conversation
Jonasdoubleyou
previously approved these changes
May 20, 2026
| }); | ||
|
|
||
| if (result.openMatchRequestCount === 0) { | ||
| if (result.status === 'cancelled') { |
Member
There was a problem hiding this comment.
Previously tutee_match_request_revoked was triggered if all match requests were revoked, now it triggers always
| }); | ||
|
|
||
| if (result.openMatchRequestCount === 0) { | ||
| if (result.status === 'cancelled') { |
| if (isElevated(context)) { | ||
| pupil = await prisma.pupil.findFirst({ where: { id: openMatchRequest?.pupilId } }); | ||
| } else { | ||
| pupil = await getSessionPupil(context); |
Member
There was a problem hiding this comment.
You allow pupils to delete match requests of other pupils?
| if (isElevated(context)) { | ||
| student = await prisma.student.findFirst({ where: { id: openMatchRequest?.studentId } }); | ||
| } else { | ||
| student = await getSessionStudent(context); |
Jonasdoubleyou
approved these changes
May 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ticket
Resolves https://github.com/corona-school/project-user/issues/1593 (not really yet)
What was done?
Today I decided to give implementing match requests as an entity a try and see how much chaos it creates across the codebase 😅. This is still a WIP but I still wanted to get an initial round of feedback before moving on with more changes.
There are still a few TODOs around endpoints that need to be updated now that match requests have their own IDs. There are also some cases where I’m not yet sure about the best approach (for example, a notification hook cancelling a specific match request)
Anyway feedback is more than welcome 🤓