Skip to content
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

^register_hackathon/ endpoint should validate whether a user has already registered for a event #7070

Closed
walidmujahid opened this issue Jul 7, 2020 · 2 comments · Fixed by #7290

Comments

@walidmujahid
Copy link
Contributor

Describe the bug

Duplicate HackathonRegistration instances created when multiple requests are sent to the ^register_hackathon/ endpoint.

To Reproduce

In my local docker build, I create a hackathon event, then I go to the onboarding page and click "Join Now". I continue to click and each click sends new request.

Expected behavior

There should not be duplicate HackathonRegistration for the same user under the same hackathon.

Solutions

The hackathon_registration should check if there is aleady an HackathonRegistration instance for the user under the given hackathon event and if so then an error should be returned or nothing should happen.

Furthermore, on the user frontend, any only a single POST request should be sent to ^register_hackathon/ and the page should either refresh, redirect somewhere else, or show a success alert. For example, on the hackathon onboarding page, it may be prudent to disable the "Join Now" button after the first click and the page should show a success alert, redirect to the prize page, refresh to onboarding page, or a combination such as: disable button, show success alert, then automatically redirect to prize page after a few seconds if applicable, otherwise refresh the page.

@PixelantDesign
Copy link
Contributor

Thanks @walidmujahid! Are you interested in helping us with this one?

@walidmujahid
Copy link
Contributor Author

Thanks @walidmujahid! Are you interested in helping us with this one?

Yes. I will be working on this unless someone had grabbed it. I should have posted yesterday my intention.

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 a pull request may close this issue.

2 participants