Skip to content

WIP: Feat: Match request entity - #1401

Draft
JeangelLF wants to merge 9 commits into
masterfrom
feat/match-request-entity
Draft

WIP: Feat: Match request entity#1401
JeangelLF wants to merge 9 commits into
masterfrom
feat/match-request-entity

Conversation

@JeangelLF

Copy link
Copy Markdown
Contributor

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 🤓

@JeangelLF
JeangelLF requested a review from Jonasdoubleyou May 19, 2026 14:47
@realmayus
realmayus temporarily deployed to backend-feat-match-requ-igogff May 19, 2026 14:48 Inactive
Jonasdoubleyou
Jonasdoubleyou previously approved these changes May 20, 2026
Comment thread graphql/pupil/mutations.ts Outdated
Comment thread common/notification/hooks.ts Outdated
@JeangelLF
JeangelLF temporarily deployed to backend-feat-match-requ-igogff May 22, 2026 13:19 Inactive
Comment thread common/match/request.ts Outdated
});

if (result.openMatchRequestCount === 0) {
if (result.status === 'cancelled') {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previously tutee_match_request_revoked was triggered if all match requests were revoked, now it triggers always

Comment thread common/match/request.ts Outdated
});

if (result.openMatchRequestCount === 0) {
if (result.status === 'cancelled') {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

if (isElevated(context)) {
pupil = await prisma.pupil.findFirst({ where: { id: openMatchRequest?.pupilId } });
} else {
pupil = await getSessionPupil(context);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

@JeangelLF
JeangelLF temporarily deployed to backend-feat-match-requ-igogff May 26, 2026 12:43 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants