Skip to content

feat(backend): add API to leave hackathon - #397

Merged
marftn merged 5 commits into
mainfrom
feat/leave-hackathon
Nov 2, 2026
Merged

marftn merged 5 commits into
mainfrom
feat/leave-hackathon

Conversation

@marftn

@marftn marftn commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Changes

  • Add the Leave handler that lets users leave a hackathon they are member of.
  • Add the corresponding tests.
  • Slight refactor to improve the code quality (remove duplication, add helpers).

Even though the issue mentions adding a new Participant service, I added Leave in the Hackathon service. I believe it makes more sense there, as other similar actions (e.g. Join) are there as well. If we decide that we want to add a new Participant service, all these actions should be moved as well, creating a change in the API. This would require a PR on its own.

Related issue: #346

Note

Because it was not mentioned in the issue I took the following decisions:

  • Leaving a hackathon also takes you off your team.
  • You lose edit rights on the projects you proposed. The projects themselves stay.
  • Your project preferences and registration answers are deleted.
  • Your votes and submissions are kept, because they belong to your team.
  • Participants waiting for approval can leave too.
  • Nobody can leave once the hackathon is over.
  • An organizer removing a participant has the same effect as the participant leaving.

Let me know if you think something is wrong and should behave differently.

@marftn
marftn requested a review from sabinem October 30, 2026 15:42
@marftn
marftn merged commit 0a3539d into main Nov 2, 2026
4 checks passed
@marftn
marftn deleted the feat/leave-hackathon branch November 2, 2026 15:12
sabinem added a commit that referenced this pull request Nov 6, 2026
A confirmed participant leaves from their own profile inside the
hackathon. Somebody still on the waitlist cancels from the public page,
the only page they can open. Both call the Leave RPC (#397) through one
helper, and both ask first in the app's confirm dialog, which gains an
optional cancelLabel so "Cancel registration" does not sit beside a bare
"Cancel".

Leave is not offered to owners: the RPC keeps the Owner role, so they
would still run the hackathon. Nor once it has finished, which the RPC
refuses.
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.

1 participant